I can't trigger key press in Drum Machine project

I can't trigger key press in Drum Machine project
0

#1

Hi, I am having trouble trigerring the clickable drum pads by key press. Is there a method for this or something?
Here’s what I’ve done so far
I am using jquery.


#2

Try:

$(document).keydown(({which}) => {
  const letter = String.fromCharCode(which);
  $("#"+letter).click();
});

#3

wow…it worked!!..Thank you very much