bpo-6739: IDLE: Check for valid keybinding in config_keys by csabella · Pull Request #2377 · python/cpython (original) (raw)
listKeysFinal
is a Listbox
with a get(location) method, not a StringVar
with get()
and set(value)
methods. Oh how I wish it were ;-). It is the vertical list in a box in the dialog with a, b, ...z, A, B, .....,DownArror
. The .get(ANCHOR)
call gets the currently line with a selection anchor, which in this case is set by clicking on an item. It took me awhile to figure out how to mock it so I could set the value to be returned by the call within the KeysOK function.
With the patch, the function is a bit odd in the argument is replaced by modifiers and key for some of the checks. More revision is needed in a further issue.