Drum Machine - trouble firing event on keydown

Well I’ve finished my project and I actually quite pleased I was able to figure it out, even if its not the way most of you would have built it.

Everything works just fine and as expected except when initially hitting the drum pad keys.
When I first hit the keys the keydown event that changes the class of the drum pad wont fire. But after hitting the same key again it works just fine, and continues to work just fine upon future key hits.

Its a bit hard to explain here but if you test out my codepen it will be obvious.

drum pads

How do I resolve this? I’m sure its an easy fix but it has frustrated me to no end!