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

Register Alt+Q, and just pressing the Q key will also perform the keyDownHandler callback #52

Closed
CanFor opened this issue Mar 15, 2024 · 1 comment

Comments

@CanFor
Copy link

CanFor commented Mar 15, 2024

HotKey _hotKey = HotKey(
      key: PhysicalKeyboardKey.keyQ,
      modifiers: [HotKeyModifier.alt],
      // Set hotkey scope (default is HotKeyScope.system)
      scope: HotKeyScope.inapp, // Set as inapp-wide hotkey.
    );
await hotKeyManager.register(
      _hotKey,
      keyDownHandler: (hotKey) {
        print('onKeyDown+${hotKey.toJson()}');
      },
      // Only works on macOS.
      keyUpHandler: (hotKey) {
        print('onKeyUp+${hotKey.toJson()}');
      },
    );

Register only Alt+Q or Alt+Q and Q, press Q, and only perform the keyDownHandler callback of Alt+Q, need help to check,thanks.

@lijy91
Copy link
Member

lijy91 commented Mar 16, 2024

Fixed in v0.2.1

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