[issue27294] Better repr for Tkinter event objects
Terry J. Reedy
report at bugs.python.org
Wed Jul 20 16:57:29 EDT 2016
Terry J. Reedy added the comment:
Addendum: I verified flag 8 is Mod1 is Numlock on Windows. http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/event-handlers.html has table that claims that 8 is Left Alt and that 16 is NumLock. From what you say above, true on non-mac *nix, and only there.
Flag 32 is Mod3 = Scrolllock on Windows.
Question: autocomplete.py refers to event.mc_state in
if hasattr(event, "mc_state") and event.mc_state:
# A modifier was pressed along with the tab, continue as usual.
return
It is not mentioned as an event field in either the NMT ref or http://www.tcl.tk/man/tcl8.6/TkCmd/event.htm#M29. However, it seems to be the state minus any 'lock' flags, Nun/Caps/Scrolllock on Windows. It must use a system-specific mask. The only Google hit for "tk event mc_state" is my recent commit of test_autocomplete.py. Is this a normal tk event attribute or a local addition?
There is also mc_type, which is 0 for a tab combinations.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27294>
_______________________________________
More information about the Python-bugs-list
mailing list