Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lowy opened this issue Mar 20, 2022 · 4 comments
Open

Comments

@lowy
Copy link

lowy commented Mar 20, 2022

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
Copy link

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

@joshgoebel
Copy link

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
Copy link

joshgoebel commented Jun 5, 2022

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.

@joshgoebel
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants