- Home /
GetKey/GetButton not working if 2 Adjacent keys are being pressed at the same time
Gonna try and explain this as best i can, the WASD keys are set in the input manager as horizontal and vertical, these work fine, the issue is with other getkey and getbutton inputs not working if they are next to the wasd keys
for example say i set the E key to attack (adjacent to the W and D keys), pressing E alone will attack, holding down D and pressing E will attack and so will holding W and E, however if you push down both W and D and try to press E it doesnt register and no attack occurs
I messed about and found that if i tied attack to L then it would work always regardless of what was pressed, i then tied attacking to X (adjacent to S and D) and tried it with those keys, the results were similar to first instance, that being it wouldnt register if S and D were held down
so whats causing this? anyone had anything similar, its unlikely il register the keys so close to the keybad anyways but im surious as to why it isnt working
Answer by Dave-Carlile · Oct 19, 2015 at 12:50 PM
I would first look for some sort of bug in your code, but since it works fine with other keys (I assume you just replace the key you're checking for and nothing else) then it's likely a hardware thing. Because of how keyboards are wired up internally there are certain key combinations that simply don't work.
It's apparently called "ghosting"... here's a Microsoft post about it...
Thanks man, il try testing it out on other computers to try and narrow down the problem
Your answer
Follow this Question
Related Questions
Why right alt (alt gr) acts like left ctrl?! 1 Answer
D-Pad as Button instead of Axis 3 Answers
Use Canvas Buttons as Input Axis 1 Answer
Mouse Button vs Get Button 1 Answer
Get numeric key 4 Answers