So I’m having trouble getting my hotkeys to work for my drum machine project. I’ve tried using
react-hotkeys keymaps and handlers to wrap my
DrumButton components and even the audio elements within them, but no luck. What I’ve shared now is an attempt to get my
.drum-pad components to listen for a
keyDown event that matches the associated hotkey and then play the audio element within. I’d greatly appreciate any pointers anyone can give me to fix this!