function onKeyUp(event) {
    const { key } = event;
    const index = keyMap.indexOf(key);
    if (index > -1) {
      keys.pressed[index] = 0;
      keys.lastPressed = -1;
    };
  }
/**
   * Callback to handle key up events.
   * If the released key is one of the accepted by Chip-8, it is
   * stored in memory as released
   * @param {Object} event keyDown event
   */
Callback to handle key up events.
If the released key is one of the accepted by Chip-8, it is
stored in memory as released
@param {Object} event keyDown event
Callback to handle key up events . If the released key is one of the accepted by Chip - 8 it is stored in memory as released @param { Object } event keyDown event
function onKeyUp(event) {
    const { key } = event;
    const index = keyMap.indexOf(key);
    if (index > -1) {
      keys.pressed[index] = 0;
      keys.lastPressed = -1;
    };
  }
function onKeyUp ( event ) { const { key } = event ; const index = keyMap . indexOf ( key ) ; if ( index > - 1 ) { keys . pressed [ index ] = 0 ; keys . lastPressed = - 1 ; } ; }
Callback to handle key up events.
Callback to handle key up events .