title: Pressing and Holding a key in LWJGL
body: <p>I am using LWJGL and I want to cause an event to rapidly take place when I press and hold a key (like holding a letter key in word).</p>
  
  <p>This is my attempt:</p>
  
  <pre><code>while(Keyboard.next())
  {
      if (Keyboard.getEventKeyState())
      {
          if (Keyboard.isKeyDown(Keyboard.KEY_UP)) 
          {
              i += 5.0f;
          }
          if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) 
          {
              i -= 1.0f;
          }
      }
  }
  </code></pre>