0

I was wondering if there was some sort of workaround for this. Basically the problem is that, when using LibGDX InputProcessor's keyDown/Up, it never allows me to have spacebar, up arrow key and left arrow key pressed at same time. I read online that it is a somewhat common problem with arrow keys that isn't exclusive to libgdx.

I was wondering if there is a workaround (besides switching to WASD). Thanks.

Edit, I wanted to add some details to prove it's not an issue with my code: I ran some tests to make sure before posting here. The issue is that when, for example, spacebar and left arrow are pressed, keyDown won't execute if the player presses up arrow. Basically whenever there is at least 2 of these pressed, the other one won't update. For some reason however, it does work with right arrow instead of left.

Edit 2: Using Gdx.input.isKeyPressed(int key) doesn't work either.

vedi0boy
  • 1,030
  • 4
  • 11
  • 32
  • I guess I'll just switch to wasd and if players have a keyboard that can handle it, they can switch to arrow keys. – vedi0boy Jan 27 '16 at 15:31
  • 1
    I think you will. It's to do with the fact that keyboards are wired using a keyboard matrix. Occasionally you can hit a key combination where one of the keys is ignored because both wires it uses are already used by other keys in the combo. – Phil Anderson Jan 27 '16 at 16:47

0 Answers0