HotKey icon indicating copy to clipboard operation
HotKey copied to clipboard

Is it possible to make a hotkey with multiple keys

Open NiklasWyld opened this issue 1 year ago • 1 comments

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: { ... })

NiklasWyld avatar Jan 29 '24 15:01 NiklasWyld

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.

INCHMAN1900 avatar Apr 17 '24 01:04 INCHMAN1900