window.addEventListener('keydown', function(e) {
  let audio = document.querySelector(`audio[data-key='${e.keyCode}']`)
	let key = document.querySelector(`.key[data-key='${e.keyCode}']`)
	if (!audio) return
  audio.currentTime = 0
  audio.play()
  key.classList.add('playing')
})

function removeTransition(e) {
  if (e.propertyName !== 'transform')
  this.classList.remove('playing')
}

let keys = document.querySelectorAll('.key')
keys.forEach(key => key.addEventListener('transitionend', removeTransition))
window.addEventListener('keydown', function(e) {
  let audio = document.querySelector(`audio[data-key='${e.keyCode}']`)
	let key = document.querySelector(`.key[data-key='${e.keyCode}']`)
	if (!audio) return
  audio.currentTime = 0
  audio.play()
  key.classList.add('playing')
})
--- 
+++ 
@@ -6,3 +6,11 @@
   audio.play()
   key.classList.add('playing')
 })
+
+function removeTransition(e) {
+  if (e.propertyName !== 'transform')
+  this.classList.remove('playing')
+}
+
+let keys = document.querySelectorAll('.key')
+keys.forEach(key => key.addEventListener('transitionend', removeTransition))
Add transitionend event to remove playing class
