You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in order to receive only events on a keyup and avoid repetition events when keys remain pressed. This works well on shortcuts not used by the browser.
However, on command + Z, command + X, command + C, etc., for example, the browser takes over.
If you don't use keydown/keyup, it works, but we receive continuous events if the keys remain pressed.
Is there a way of receiving a single event for each key pressed, or of unbinding the browser keys when the same shortcut is used?
The text was updated successfully, but these errors were encountered:
As far as I understand the documentation, you can check for the event.type inside your callback. If it is keydown, return false to prevent the browser default. If it is keyup, do your normal callback
good morning,
We use hotkey.js as follows:
hotkey.unbind()
hotkeys(shortcut.key, shortcut.options , event)
with options: { keydown: false, keyup: true }
in order to receive only events on a keyup and avoid repetition events when keys remain pressed. This works well on shortcuts not used by the browser.
However, on command + Z, command + X, command + C, etc., for example, the browser takes over.
If you don't use keydown/keyup, it works, but we receive continuous events if the keys remain pressed.
Is there a way of receiving a single event for each key pressed, or of unbinding the browser keys when the same shortcut is used?
The text was updated successfully, but these errors were encountered: