xkeysnail
xkeysnail copied to clipboard
key.py is too young too simple, Need a more detailed key comparison table .
Many key names are not stated and don't know what they are for example menu is not menu on the keyboard, but i dont't know that key call what in key.py
Ought to be easy enough to write a tiny utility to let one probe keys by pressing them.
In fact such a program already exists, evtest
... push a key and it tells you what it is... Menu (often) refers to the Windows/Apple/Cmd/Super key... in term of ev codes it's named LEFT_META and RIGHT_META (that's the name the Linux kernels gives it). Not to be confused with Alt.
I'd be open to a few aliases here for clarity, but don't think we want to go crazy. This might rather be a doc/FAQ fix.
menu is not menu on the keyboard, but i dont't know that key call what in key.py
There is MENU
but that doesn't tell you what it is (or if it even exists on your keyboard). Usually where you want to start is:
- This key on my keyboard, I want to use it in a combo.
- Darn, I don't know the internal
Key.WHAT
name of the key. - Run
evtest
command, and hit key.
For example for the Command key on my Apple keyboard:
Event: time 1654470013.013633, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e3
Event: time 1654470013.013633, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 0
Event: time 1654470013.013633, -------------- SYN_REPORT ------------```
The part we want there is code 46, which you can then lookup in key.py and find out is `LEFT_META`... (which is a bad example, as we've just been discussing in another issue how confusing meta/super is)... but for most keys this is clearer.
They key names should actually exactly match I think but sometimes we've added _
to them... as in this example where KEY_LEFTMETA is Key.LEFT_META
...