Bug: useHotkeys and multiple pressings with special keys will make a stuck normal hotkey
tani-shi opened this issue · 3 comments
tani-shi commented
Description
When I do pressing multiple times a some key with keeping pressing a special key (e.g. cmd + z), normal hotkey (e.g. ArrowUp, ArrowDown) will be stuck and not working.
export const appHotkeys = {
...
undo: {
label: 'table.undo',
command: platformSelect({ mac: '⌘ Z' }, 'Ctrl+Z'),
},
...
} satisfies HotkeysConfig
useHotkeys(
[
'ArrowUp',
'⇧ ArrowUp',
'ArrowDown',
'⇧ ArrowDown',
'ArrowLeft',
'⇧ ArrowLeft',
'ArrowRight',
'⇧ ArrowRight',
],
(e) => {
// won't be fired
},
[...]
)
Link to Reproduction
No response
Steps to reproduce
- Define a hotkey with cmd+z (undo) to hotkeys.ts
- Implement useHotkeysShortcut for hooking undo command
- Implement useHotkeys for hooking ArrowUp/ArrowDown
- Undo multiple times with keeping pressing cmd key
- Press ArrowUp or ArrowDown will be not working
Saas UI Version
2.6.2
Chakra UI Version
No response
Browser
No response
Operating System
- macOS
- Windows
- Linux
Additional Information
No response
linear commented
Pagebakers commented
Thanks for reporting, will investigate asap.
Pagebakers commented
Fixed in 2.8.2