-
Notifications
You must be signed in to change notification settings - Fork 160
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
[BUG] Single key getting activated on multi-key sequence #234
Comments
We have the same problem, and interesting is that this looks to be a special |
Same problem here, as well. This is an (admittedly heavy-handed) workaround, as long as you don't have any modified shortcuts:
|
Unfortunately this won't work for us since we are using command + some letters to trigger events. Any other suggestions are more than welcome!!! |
I have a similar situation where I have a hotkey for |
Hi @mikeyyyzhao, @martin-svk, @mschaef-da and @amcdnl. Thank you all for sharing that you're having this issue. This should not be the case as sub-matching is disabled by default. The |
@greena13 I'm also dealing with this problem. I have a single handler mapped to
|
This is from our app. The config and log is below.
|
I found a good workaround for this, define the keys "command+c" and just handle it with an empty function. Now the handling defaults to whatever the browser's default behavior is.
You can still have a keymap for the invidivual "c" and "f" key. |
@ogtfaber Thanks, i've tried the workaround approach and it works. |
For anybody that's still experiencing this issue: I was able to solve it by defining the sequence in an array. // Does NOT work as expected
TOGGLE_LEFT_MENU: {
name: 'Toggle left menu',
sequence: 'm',
}, // Works as expected
TOGGLE_LEFT_MENU: {
name: 'Toggle left menu',
sequences: ['m'],
}, |
Describe the bug
I have hotkeys set to c and v, but when the user types command+c (to copy), or command+v (to paste), the c and v hotkeys I have set up get triggered as well.
How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc)
I am using GlobalHotKeys
Expected behavior
The hot keys attached to c and v are only triggered on when the user types c and v, not when they are in combination with other keys.
Platform (please complete the following information):
Web
The text was updated successfully, but these errors were encountered: