title: Java KeyListener Not Registering Arrow Keys
body: <p>I'm writing a simple program in Java which includes a KeyListener with the following overriding they KeyTyped method:</p>
  
  <pre><code>@Override
          public void keyTyped(KeyEvent e)
          {
              int key = e.getKeyCode();
              System.out.println("TEST");
  
              if (key == KeyEvent.VK_KP_LEFT || key == KeyEvent.VK_LEFT)
              {
                  System.out.println("LEFT");
                  //Call some function
              }
              else if (key == KeyEvent.VK_KP_RIGHT || key == KeyEvent.VK_RIGHT)
              {
                  System.out.println("RIGHT");
                  //Call some function
              }
          }
  </code></pre>
  
  <p>When I type anything other than the arrow keys (e.g. "a"), it prints <code>TEST</code> as it should. However, when I type a numpad arrowkey, it only prints <code>TEST</code> and when I type a standard arrow key it doesn't print anything at all. Is this possibly because I'm on a laptop, or have I just made a silly mistake somewhere?</p>