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
isHotkeyPressed does not work inside a hook callback.
To Reproduce
constcombos=Object.fromEntries(commands.filter(({ combo })=>{returncombo;}).map((command)=>{if(!command.combo){thrownewUnexpectedStateError('Expected to find a combo');}return[command.combo.join('+'),command];}),);useHotkeys(Object.keys(combos),(event)=>{console.log('> 1',combos,event);for(const[combo,command]ofObject.entries(combos)){if(isHotkeyPressed(combo)){console.log('> 2',command);}}});
I need to dynamically bind hot keys.
In this case, a key would be meta+/.
The > 1 triggers, but > 2 does not.
The text was updated successfully, but these errors were encountered:
Describe the bug
isHotkeyPressed
does not work inside a hook callback.To Reproduce
I need to dynamically bind hot keys.
In this case, a key would be
meta+/
.The
> 1
triggers, but> 2
does not.The text was updated successfully, but these errors were encountered: