Multiple GetKey/GetButton/GetAxis not working as intended

Ok so I was writing a simple character controller, but I stumbled upon a problem: pressing space + DownArrow + RightArrow at the same time isn’t working as intended, only 2 at a time is working. This is not from my code:

  • Space + DownArrow + LeftArrow is working correctly;
  • using GetAxis(“Horizontal”) works when pressing D + Space + DownArrow, but not when it is RightArrow + Space + DownArrow.
    PS: I don’t know if this is a keyboard issue, the key is working normally, only this case it is not.

Feel free to delete this thread of this turns out to be a limitation of my keyboard, I am not tech savy enough to know if this is a problem coming from hardware limitation or the software :slight_smile:

Yes, many keyboards have hardware limitations about which groups of keys can be pressed simultaneously :expressionless:

The problem you are experiencing is called “Key Jamming” (sometimes mistakenly called “Key Ghosting”). It has actually been a problem for decades, and has nothing do do with Unity. Which keys you can press at the same time is determined by the physical wiring inside of your keyboard, and will often differ from player to player.

However, keys such as CTRL, ALT, and SHIFT are designed to be pressed at the same time as other keys. Because of this, they are wired differently, and can usually be pressed regardless of which other keys you have pressed down; this is why a lot of games use them for firing, crouching, and other actions you do simultaneously while pressing down keys for moving.

Try using some of those keys for the controls in your game, and see if that solves your problems.

Thank you for the explanation, I thought that something like that happened,so I mapped some of the keys to Shift, now everything is fine. :slight_smile: