• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Limit on number of key pressed events

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
I've discovered something odd and annoying: there is a limit on the number of simultaneous key pressed events that can occur at any given time. In other words:

  • UI - Player Any Player presses Any key Down with shift Exclude, control Exclude, alt Exclude
will cease to fire if you have several other keys already held down. I've uploaded a simple map that has 2 triggers, one that fires when you press a key and one that fires when you release a key. If you hold down: 1, then 2, then 3, then 4, then 5... at some point the trigger will stop firing.

Here are some interesting things I've discovered:
- you can only hold down 3 keys on your numberpad, but if you press the numbers on your keyboard you can get 4-5 held before it breaks
- the spacebar seems to be unique and will always work
- the keys on the keyboard appear to have separate limits...so if you hold down Q, W, E, R then A, S, D and F will no longer work, but M and N will.

It would be nice if there were some way around this, but I can't imagine what it could be. Nonetheless, I thought it might be worth posting here for others.

Darwin
 

Attachments

  • key press limit.SC2Map
    13.8 KB · Views: 54

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
This limit has nothing to do with StarCraft II.

It is the result of the contact matrix that is used by keyboards to detect key presses. Pressing too many keys at once shorts out too many lines as it scans the matrix causing it to no longer be able to detect additional key presses.

Switch keyboards should not have this limit (in theory) as they have a discrete contact per key but in reality you may find a limit occurring else where (such as the interface to the computer or even the computer drivers).

- you can only hold down 3 keys on your numberpad, but if you press the numbers on your keyboard you can get 4-5 held before it breaks
- the spacebar seems to be unique and will always work
- the keys on the keyboard appear to have separate limits...so if you hold down Q, W, E, R then A, S, D and F will no longer work, but M and N will.
Commonly used key combinations are specifically wired in such a way as to allow them to be resolved. The key matrix is distorted heavily on the keyboard giving some areas better key recognition while others worse.

Game controllers, such as a Xbox360 controller, use a separate driver and due to the limited number of buttons that are physically separated they use discrete switches. This allows you to press every button on a game controller at the same time and still have them register being pressed/released, something that is not possible on most keyboards. That said, you obviously cannot use a game controller in SC2.
 
Level 14
Joined
Aug 30, 2004
Messages
909
You have an impressive breadth of knowledge, Dr.!

Nonetheless, I think I found a cool way around this. Sometimes work-arounds for bugs produce cool ideas. I decided to make a "linked "weapon item that players can buy and link up their guns so that one key press can fire multiple weapons. This should solve this problem and is also pretty cool.

Thanks Dr.

Darwin
 
Status
Not open for further replies.
Top