golang-design / hotkey

⌨️ cross-platform hotkey package
https://golang.design/x/hotkey
MIT License
215 stars 10 forks source link

Not working on Ubuntu 18? #25

Open mwalkerr opened 1 year ago

mwalkerr commented 1 year ago

The .Register() call succeeds without returning an error, but the shortcuts I'm trying (Ctrl + Shift + O and Ctrl + Shift + P) just aren't receiving any events. Using sudo showkey I see the same keycodes for ctrl (29), shift (42), and O (24) as I do in a Ubuntu 22 VM where the hotkey does work. Are there dependencies that may not be present in Ubuntu 18? Any ideas on how to debug?

mwalkerr commented 1 year ago

Ah, numlock was toggled on. Found that out by using xev and seeing that the state was always 0x10 even when I wasn't pressing any modifiers. xmodmap showed Mod2 was numlock.

Ideally there'd be a way to register a hotkey that works with or without numlock toggled