koekeishiya / skhd

Simple hotkey daemon for macOS
MIT License
6.05k stars 204 forks source link

[/{ key not recognized as a literal #321

Open clarsen opened 9 months ago

clarsen commented 9 months ago

skhd-v0.3.9

When I try to use this binding:

shift + alt - [ : yabai -m window --space next

I get this error:

57:15 expected key-literal

and although skhd is still running, it won't respond to any keypresses.

tjex commented 9 months ago

skhd won't recognise many (if any?) symbols. Instead you need to enter its HEX keycode.

You get this code by running skhd -o in a terminal, and then pressing your key. insert this keycod in place of the symbol in your skhd conf.

So for me '[' = 0x21

so your conf would be: shift + alt - 0x21 : yabai -m window --space next

amlanjlahkar commented 7 months ago

I'm trying to use ']' but couldn't find its code. Using skhd -o displays the input characters as it is

Screenshot 2024-02-02 at 6 29 10 PM
tjex commented 7 months ago

have a look at #309 . similar issue and it got solved in the meantime by the OP with some combination of restart/reinstall/accessbility/etc

amlanjlahkar commented 7 months ago

I tried stopping, reinstalling and restarting the service but no luck. For anyone with the problem, this stackoverflow answer should help https://stackoverflow.com/a/16125341

akavga commented 4 months ago

I add the same issue as @amlanjlahkar on macOS using Alacritty. Reverting to the basic Terminal.app solved the issue and made hex keycode available.