title: Java game walking + jumping stops the key pressing action?
body: <p>Hello in my game when I walk and jump, it stops everything after the jump finishes:</p>
  
  <p><img src="https://i.stack.imgur.com/hqWIT.gif" alt="not hotlinked image"></p>
  
  <p>Can you see after a jump, it continues walking for a bit &amp; then stops?
  It should stop immediately but my walking queue continues executing because I didn't reset it, it should only reset upon keypress or release. But keypressing will stop working after i release my jump key. I think if I use  2 keys at a time and release on, the OS won't remember the old key I am still pressing. Even in your browser URL input, press and any key and hold, and then hold another key for bit &amp; release it, it won't write the old key anymore.</p>
  
  <p>Is there a fix for this? I am using keylistener, because i couldn't figure out how to find out when a key was released in KeyBinds.</p>
  
  <p>This is how I do it:</p>
  
  <pre><code>public class Keyboard implements KeyListener {
  
      private Player player;
  
      public Keyboard(Player p) {
          this.player = p;
      }
  
      @Override
      public void keyPressed(KeyEvent e) {
          System.out.println("yes");
          switch (e.getKeyCode()) {
  
              case KeyEvent.VK_LEFT:
                  this.player.getMovement().moveLeft();
                  break;
              case KeyEvent.VK_RIGHT:
                  this.player.getMovement().moveRight();
                  break;
              case KeyEvent.VK_SPACE:
                  this.player.getMovement().jump();
                  break;
          }
      }
  
      @Override
      public void keyReleased(KeyEvent e) {
          int left = KeyEvent.VK_LEFT;
          int right = KeyEvent.VK_RIGHT;
          if (e.getKeyCode() == left || e.getKeyCode() == right) {
              this.player.getMovement().stopMovement();
          }
      }
  
      @Override
      public void keyTyped(KeyEvent e) {
  
      }
  
  }
  </code></pre>
  
  <p>How can I fix this issue? If you need more parts of the code like the jump or walking queue, let me know.</p>
  
  <p>Keylog:</p>
  
  <pre><code>Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Right clicked!
  Space is a nice button
  </code></pre>