◐ Shell
clean mode source ↗

Message 296796 - Python tracker

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.