Skip to content

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

Open

Description

@NiklasWyld

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

Activity

  1. INCHMAN1900 commented on Apr 17, 2024

    @INCHMAN1900

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions