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

[FEAT]: list of key codes #23

Open
rwijtvliet opened this issue Jul 3, 2023 · 4 comments
Open

[FEAT]: list of key codes #23

rwijtvliet opened this issue Jul 3, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@rwijtvliet
Copy link

Is your feature request related to a problem? Please describe.
It's unclear how to refer to non-alphanumeric keys.

Describe the solution you'd like
In the readme.md, add a few examples, e.g. how to refer to the windows key (win? meta? super?) and the control key (control? ctrl?), how to refer to the bracket keys, the semicolon, etc. Or just a link to a website that lists them.

@rwijtvliet rwijtvliet added the enhancement New feature or request label Jul 3, 2023
@LGUG2Z
Copy link
Owner

LGUG2Z commented Jul 4, 2023

The underlying library just uses the standard Win32 keycodes with the VK_ prefixes omitted: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

@skotom
Copy link

skotom commented Aug 24, 2023

I tried keys from url you provided but for example, RMENU didn't work. I don't get why but I had to change RMENU to RMenu for it to register. I've checked the library but I couldn't figure out why this is so.

@GaussianWonder
Copy link

This seems to be just a matter of documentation. I also think there should be a table or list which indicates what the parses parses.

Here is a breakthrough:

  1. Cargo.toml: there is one dependant responsible for registering hotkeys - repo here
  2. Here you can see the windows-hotkeys crate being used
  3. Here is the implementation of VKey::from_keyname which is being used by whkd

Although not explicitely written anywhere, you can see the value is trimmed of the VK_ prefix, like @LGUG2Z mentioned. It also appears to be case insensitive.

It would be an effortless addition to mention in some README what values are successfully interpreted either by windows-hotkeys or by whkd

@arnm
Copy link

arnm commented Oct 8, 2023

This seems to be just a matter of documentation. I also think there should be a table or list which indicates what the parses parses.

Here is a breakthrough:

  1. Cargo.toml: there is one dependant responsible for registering hotkeys - repo here
  2. Here you can see the windows-hotkeys crate being used
  3. Here is the implementation of VKey::from_keyname which is being used by whkd

Although not explicitely written anywhere, you can see the value is trimmed of the VK_ prefix, like @LGUG2Z mentioned. It also appears to be case insensitive.

It would be an effortless addition to mention in some README what values are successfully interpreted either by windows-hotkeys or by whkd

This worked for me. As an example, I wanted to map alt + semicolon. In skhd, i would do alt + 0x29 but for whkd, I have to do alt + OEM_1. Sucks that I cant just copy paste but its cool that I can copy paste 99% of skhd to wkhd.

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

No branches or pull requests

5 participants