Open amatoenot opened 4 months ago
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?
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)
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
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
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.
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.