I might be misinterpreting the instructions, but I can’t seem to pass test 6. When I push Q, the q drum pad plays and so forth, but I obviously have something wrong, but I don’t know what. Thanks!
My Drum Pad (codepen)
Drum Machine Test
Obviously, I’m not done and haven’t styled it.
I don’t know how the test is created, but pushing “Q” only works, if your drum-machine has the focus, i.e. if you have clicked on it with the mouse before.
If you click on the white background, then pushing “Q” is not producing any sound.
On handleDownKey(input) you bound the keydown-event like that:
keydown.onkeydown = function(event)...
Maybe it will help binding it to document?
That…makes total sense. I wasn’t even thinking of that. Let me see wha tI can work out.