DrumMachine KeyDown Problem

Hi I’ve almost finished my Drum Machine but I am having some problems getting the pads to work properly with keys. When I click on the pads, the display text input element updates with the correct description of the sound clip however if I press the corresponding key instead, only the audio plays while the display text remains unchanged. Clearly this is wrong. Can anyone offer some suggestions?

Here is the link: https://codepen.io/sam_donaldson2018/pen/bZmvKP

Update: Solved it.

My approach in general was wrong. The method responding to the keydown events was not receiving the text value. I changed it so that it accesses the text values from the array constant where they were originally set. I also attached the listener to the document instead of each drum pad.