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

0x3D not captured by skhd #96

Open
tsujp opened this issue Oct 11, 2019 · 3 comments
Open

0x3D not captured by skhd #96

tsujp opened this issue Oct 11, 2019 · 3 comments

Comments

@tsujp
Copy link

tsujp commented Oct 11, 2019

I'm attempting to use a single key as a hotkey, I've tested it with l which is 0x25 and that works, but for 0x3D which is right option it does not work.

0x3D : yabai -m config window_border off

@tsujp tsujp changed the title Single-key hotkey command 0x3D not captured by skhd Oct 11, 2019
@koekeishiya
Copy link
Owner

Uh, so modifier-keys are reported through a different event-type (kCGEventFlagsChanged), and this event is not checked when looking up registered hotkeys.

It is not as trivial as to simply run the same code for this event for multiple reasons..

The first one is that the event is triggered for both modifier-down and modifier-up events.
This can be filtered by first checking which modifier was pressed, based on the keycode - then check to see if the flag for said modifier is set, then it was a key-down event.. At this point you'd need to clear its modifier flag.

After this has been done, you could likely run it through the same code that the regular key-down events pass through.

I have not tested any of this, just my thoughts from what I remember.

@Kittease
Copy link

Hello !
I'm running into the same problem at the moment:
I'm trying to bind some yabai shortcut to my left option key (0x3A) but nothing happens when I then use it.
Is there a solution to use the option keys with skhd?
Thanks in advance!

@tsujp
Copy link
Author

tsujp commented Oct 28, 2022

Hello ! I'm running into the same problem at the moment: I'm trying to bind some yabai shortcut to my left option key (0x3A) but nothing happens when I then use it. Is there a solution to use the option keys with skhd? Thanks in advance!

@koekeishiya explained what would need to be done in their reply above. I can give this a shot when I have some free time (not soon though, swamped with real-life commitments lately).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants