Test holding key down

How to handle key holding?

Press on the key with your finger and make sure you don’t release it…



More seriously use an ActionListener detect the keydown, set some boolean to true, detect the key up and set this boolean to false. The time your boolean is true is the time the player holds the key