mooz / xkeysnail

Yet another keyboard remapping tool for X environment
890 stars 112 forks source link

key.py is too young too simple, Need a more detailed key comparison table . #156

Open lowy opened 2 years ago

lowy commented 2 years ago

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

joshgoebel commented 2 years ago

Ought to be easy enough to write a tiny utility to let one probe keys by pressing them.

joshgoebel commented 2 years ago

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.

joshgoebel commented 2 years ago

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:

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.
joshgoebel commented 2 years ago

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...