Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to figure it out how to check if keyboard key was released. I tried messing around with InputMultiplexer, InputProcessor, etc. Nothing helped. Not enough documentation from lib developers (at least for me).

Anyone had similar problem? Can someone help me?

With InputProcessor I can check if single key was pressed. But what if I want to check multiple keys?

share|improve this question
up vote 2 down vote accepted

There are two ways I can think of to accomplish this.

  1. In the InputProcessor keyPressed method you could save the key state in a map. You'll have to use the keyReleased method to set the key state to released. This way you can just check the map to make sure the right keys are pressed.

  2. Inside your update/render method call Gdx.input.isKeyPressed(Input.Keys.Key) to see if a key is pressed. This way you are polling input every frame to check for the key combination.

I personally would use method 2, but pick whatever will suit your app best. I might be able to expand on my answer more tomorrow when I'm on my Desktop. Hopefully for now this will get you going in the right direction.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.