Relative Content

Tag Archive for javascriptkeyboard-shortcuts

There is shortcut mapped with ‘n’ and ‘na’. How to handle to gets called only shortcut mapped with ‘na’ if pressing ‘n’ then ‘a’ quickly

const shortcuts = { ‘n’: () => console.log(‘Shortcut with “n” pressed’), ‘na’: () => console.log(‘Shortcut with “na” pressed’) };` I have shortcut mapped like above but problem is when pressing n then a quickly then first shortcut mapped with n gets called then shortcut mapped with na gets called. How can I change this so […]