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

Language agnostic keyboard shortcuts #504

Open
amatoenot opened this issue Mar 1, 2024 · 5 comments
Open

Language agnostic keyboard shortcuts #504

amatoenot opened this issue Mar 1, 2024 · 5 comments

Comments

@amatoenot
Copy link

It would be nice to have language-agnostic keyboard shortcuts. It seems all other system shortcuts work with key codes instead of actual symbols, so the input source doesn't matter, which is not the case with the Keyboard Cowboy. Currently, as a workaround, I have to duplicate actions to have shortcuts working in both languages.
image

@zenangst
Copy link
Owner

Hey @amatoenot, unsure how you would make this agnostic as the underlying key codes sent by the keys varies depending on which layout you are using.

Could you elaborate how this would work in practice?

@amatoenot
Copy link
Author

Hi @zenangst,
Not sure exactly. Afaik keyboard key HID is the same for any language. So maybe it's possible to create shortcuts mapped to the key HID somehow. Most of the default mac os shortcuts work this way (e.g. 'CMD + C key' copies in any language)

@zenangst
Copy link
Owner

I haven't found any information about HID related information on CGEvent's (which we are using to identify events).

https://developer.apple.com/documentation/coregraphics/cgeventfield

@amatoenot
Copy link
Author

What about CGEventField.keyboardEventKeycode? Sounds like something that can be used to identify key instead of a character.

https://developer.apple.com/documentation/coregraphics/cgeventfield/keyboardeventkeycode

@zenangst
Copy link
Owner

That is what is used to identify it today, but the current input source send different key codes for different keys depending on the layout.

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