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

Is it possible to make a hotkey with multiple keys #45

Open
NiklasWyld opened this issue Jan 29, 2024 · 1 comment
Open

Is it possible to make a hotkey with multiple keys #45

NiklasWyld opened this issue Jan 29, 2024 · 1 comment

Comments

@NiklasWyld
Copy link

I know and also use the “normal” HotKeys.

HotKey(key: .p, modifiers: [.control], keyUpHandler: { ... })

However, I now wanted to use a HotKey with a modifier but more different keys. But I can only specify one key for a HotKey/KeyCombo.

Something like this:
HotKey(keys: [.a, .b], modifiers: [.control], keyUpHandler: { ... })

@INCHMAN1900
Copy link

This is not recommended. However if you want to achieve this, you can use NSEvent.addGlobalEventListener to monitor keydown and keyup event on your own.

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

No branches or pull requests

2 participants