@Override
  public void processKeyEvent(KeyEvent keyEvent) {
    final int VK_LEFT = 0x25;
    final int VK_RIGHT = 0x27;
    final int VK_UP = 0x26;
    final int VK_DOWN = 0x28;
    final int VK_JUMP = 0x42;
    final int VK_W = 0x57;
    final int VK_S = 0x53;
    final int VK_A = 0x41;
    final int VK_D = 0x44;
    final int VK_PAUSE = 0x50; // press p for pause
    final int VK_HINTS = 0x38; // press 8 for hint map

    int k = keyEvent.getKeyCode();
    if (k > 0) { 
      k = k == VK_W ? VK_UP : k == VK_D ? VK_RIGHT : k == VK_A ? VK_LEFT
          : k == VK_S ? VK_DOWN : k;
      a[(k >= VK_LEFT && k <= VK_DOWN) || k == VK_HINTS 
          || k == VK_PAUSE ? k : VK_JUMP] = keyEvent.getID() != 402;
    }
  }