[issue27294] Better repr for Tkinter event objects

Serhiy Storchaka report at bugs.python.org
Mon Jun 13 03:52:23 EDT 2016


Serhiy Storchaka added the comment:

Thank you Terry, this information is helpful. Mod1 is Alt on X11, but not on Windows.

It looks to me that on Windows Mod1 is NumLock, Mod3 is ScrollLock, 0x20000 is Alt, 0x40000 is pad keyboard. It is not clear about Win. What events are emitted if your press say Win-X?

On Linux (X11) Mod1 is Alt, Mod2 is NumLock, Mod4 is Win, 0x2000, 0x4000 and 0x6000 are alternative keyboard layouts. But many of this I presume is configurable.

Mac OS can have its own peculiarities.

I think on this stage it is better to left standard X11 modifiers (Shift, Lock, Control, Mod1-Mod5, Button1-Button5) and output the rest modifiers in hexadecimal. End user should interpret these names and numerics in platform depending way.

----------
Added file: http://bugs.python.org/file43373/tkinter_event_repr_key_state2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27294>
_______________________________________


More information about the Python-bugs-list mailing list