Message296796
configdialog.ConfigDialog.getNewKeys() calls config_key.GetKeysDialog with a list of lists of one or more sequences (currentKeySequences). GetKeysDialog.KeysOK looks for keys.split() in currentKeySequences. Since KeysOK on only called for the no-space 'keys' produced by the basic dialog, keys.split is always [keys]. This can only match one of the length-1 lists in currentKeySequences.
The patch semi-flattens the latter to a list of lists of 1 sequence each
. But instead of looking for [keys] in the result, better and faster to omit the list wrappers and look for keys in a list or set of sequences.
A separate improvement would be to have a reverse map of sequences to pseudoevents, so the error message can specify the exact conflict instead of just saying 'some conflict'. I have separately thought that the [keys] tab of ConfigDialog should be able to display such a mapping to help one plan a new key mapping.
Off topic for this issue: the keys tab could have a 'load key-def file' function that would check a definition and if ok, load it. |
|
Date |
User |
Action |
Args |
2017-06-24 23:45:54 | terry.reedy | set | recipients:
+ terry.reedy, Saimadhav.Heblikar |
2017-06-24 23:45:54 | terry.reedy | set | messageid: <1498347954.82.0.64640610043.issue21519@psf.upfronthosting.co.za> |
2017-06-24 23:45:54 | terry.reedy | link | issue21519 messages |
2017-06-24 23:45:54 | terry.reedy | create | |
|