Simple vanilla JS equivalents to basic jquery:
// instead of jquery addClass, try:
// save item in variable
const key = document.querySelector(`.key[data-key="${e.keyCode}"`);
// add class to selected item
key.classList.add('playing');
// equivalents for remove, toggle:
key.classList.remove('playing');
key.classList.toggle('playing');
// and so on....