GameMaker Why can't one press multiple keys at the same time?

K

Karlabos

Guest
Hi.

In all my recent games I have been using keyboard_check() to check whether a key is being pressed or not.
But I noticed there is a limit (mostly 3 or more) keys which can be pressed at the same time.
For isntance if I configured my object to move with the arrows, toggle speed with X and shoot with Z, then
if I want to toggle, speed, shoot and press right sometimes it won't work. However if I stop holding either X or Z then it starts going right and I can either shoot or toggle speed again.

Basically ity seems there is some kind of priority on the keys which determines whether a key can be pressed while other is being held or not, and sometimes you need to overcome it by releasing and pressing again, which is annoying.

So... Why exactly does this happen?

Should I use other keyboard function instead?
 
R

Rukola

Guest
This is a hardware limitation of your keyboard. Unfortunately, the only solution is that you must purchase a better keyboard that does not have this limitation.

This goes for the majority of keyboards!
 
K

Karlabos

Guest
This is a hardware limitation of your keyboard. Unfortunately, the only solution is that you must purchase a better keyboard that does not have this limitation.
That's bad.

How can I know in advance if a keyboard I buy will have the same problem or not? Is there a name for the property that it doesn't happen?
 
D

dannyjenn

Guest
Depending on how your keyboard is wired, you can probably solve the problem (at least to some extent) by figuring out which keys work together and using just those. Sometimes the arrow and Z and X will not all work together, but the arrow and Z and some other key might. (Or add a custom controls feature, so that the player can set his own controls to whatever works. This is especially important, seeing as some European keyboards have the Z key somewhere else.)
 

NeoShade

Member
You need to be pretty careful with this topic. Just because you might be able to solve the problem for yourself by going and buying a better keyboard doesn't mean that people who play your game are going to do the same. You're better off developing with a MORE limited keyboard so that you pick up potential issues that your players might experience and build your game around those limitations.
 
Top