koekeishiya / skhd

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

Passing through modifier keys #341

Closed vulpescodex closed 6 months ago

vulpescodex commented 6 months ago

I'm trying to create shortcuts for arrow keys where I could still use macOS modifiers with them. E.g. Opt to move by word, Cmd to move by paragraph and Shift to select. Thus Hyper-key does not work as it reserves those modifiers. I have successfully used lctrl + rctrl to do this, but have a problem and don't know what's going wrong?

This works: lctrl + rctrl + alt - j: skhd -k "alt - left"

But this does not: lctrl + rctrl + shift + alt - j: skhd -k "shift - alt - left"

I'm using Karabiner-Elements to create a mod-tap to trigger lctrl + rctrl from Tab, but if possible I would like to avoid doing anything else in Karabiner.

In addition, while not necessary, I would like to avoid writing all the combinations separately. The example skhdrc file has a mention of the rule -> = keypress is not consumed by skhd. I however don't want to let the lctrl, rctrl and literal through, only combinations of Opt, Cmd and Shift. Is there a way to achieve this in skhd?

koekeishiya commented 6 months ago

It should be skhd -k "shift + alt - left" I think

vulpescodex commented 6 months ago

Thank you, that works! Closing the issue.