Im working on a drum machine and I have some buttons I made. I used css to give the pressed look by just adding an :active pseudo class to them. now i also have some key bindings that mirror the click events. however, i cant figure out how to apply the :active when the key is pressed. i just wrote a work around that adds a class with a keyframe that lasts .2s and then removes it with a setTimeout. this works but i was wondering if there is a more economical way. thanks for the help.
the key is the down arrow, the code is the first case in a switch block the id is #btnright(grey button lower right) and class with animation is .test