title: KeyPress: How to detect if the user pressed the "Down" arrow key on their keyboard when the app is running
body: <p>Here is what I've got so far.. I'm using this as a keybind. I want to press the "Down" arrow key anytime the app is running, and then make it auto press the "Down" arrow key 3 extra times then finish by pressing "Enter" in the code. I know this isn't the best explanation but sorry and I will try to explain it any better if you still didnt understand.</p>
  
  <p>Here is the code: </p>
  
  <pre><code>public class MyKeyListener extends KeyAdapter{ 
  @Override
  public void keyPressed(KeyEvent evt){  
  }
  
  KeyListener keyListener = new KeyListener() {
      @Override
    public void keyPressed(KeyEvent keyEvent) {
      int keyCode = keyEvent.getKeyCode();
          if(keyCode == 1005){
          System.out.println("So far, so good..");
          }
  
    }
  
      @Override
      public void keyTyped(KeyEvent e) {
          throw new UnsupportedOperationException("Not supported yet.");
      }
  
      @Override
      public void keyReleased(KeyEvent e) {
          throw new UnsupportedOperationException("Not supported yet.");
      }
  
  };
  </code></pre>
  
  <p>I think the Key arrow down is 1005. 
  I've so far wrote System.out.println("So far, so good.."); to see if the app even detects it when I press the down arrow key, but it doesn't...</p>
  
  <p>Any ideas please?</p>