Unusual Key press behavior

I am not sure if this is something that will be covered later in this project, or if it is a small detail that I have missed somewhere…

When testing the game it seems that only a certain amount of key presses are allowed at any given time- so if I am trying to move diagonally whilst firing I am sometimes unable to- the player sprite will lock on the x axis and only be able to move up and down until the fire button is released.

Hi @atrathbone,

Welcome to our community! :slight_smile:

What you describe sounds like the infamous keyboard ghosting effect, which is a hardware problem that cannot be fixed. More expensive keyboards allow more active keys but it is not recommended to develop your games based on those “better” keyboards unless you know that your future player will have the same keyboards.

You could test your keyboard here:
https://drakeirving.github.io/MultiKeyDisplay/


See also:

1 Like

I am using a very cheap keyboard haha!

It is odd because it doesn’t seem to be related to the amount of keys- more certain combinations. Anyway- not a problem with Unity!

Just out of curiosity…

“but it is not recommended to develop your games based on those “better” keyboards unless you know that your future player will have the same keyboards”

How would I be able to design around this though? Or do you just mean not design something that assumes someone is able to press a high amount of keys at once?

Thanks

As far as I’m aware, there are different typical combinations possible but I’m not sure about that.

Or do you just mean not design something that assumes someone is able to press a high amount of keys at once?

The majority of people use cheap keyboards, so I would not preassume anything. Testing on different keyboards is key. What you could try is to fire with the ctrl key instead of the space key.

If that does not solve the problem, which is relatively likely, I would suggest to implement separate input for diagonal movement, e.g. with the Q and the E key, so the player never has to press more than 2 keys at once.


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms