Web Dev/WebUIDesign
Mulit-Key Combination Detection
Key combination can be easily detected using JS map. Set also works.
In keydown
event, a key is added to map.
In keyup
event, a key is removed from map.
Any number of key press at the samed time will be recorded in the map (set).
Shortcut Selection Example (Svelte)
How is this guide?