- Home /
Input.GetKeyDown doesnt work with certain key combinations
So I am build an action game and some times I need to press "c" while holding "d" and "x', however, I found that if I hold "x" with "w"/"s"/"e"/"d", GetKeyDown("c") will not fire.
Anyone knows why??
code is simply like:
void Update() { if (Input.GetKeyDown("c")) { Debug.Log("catch"); } }
And I tried holding different keys and press "c".
Thank you!
Answer by Xavier78 · Feb 25, 2019 at 03:32 AM
This sounds like a hardware issue. None mechanical keyboards have a limit to how many/what combination of keys can be pressed at a time, because not all keys have a dedicated switch to read their input. I believe this is called Rollover to fix this I would get a mechanical keyboard. Though using none standard key combos is not advised in the first place. There is a reason ctrl/shift are used for key combos. Other wise use a different key that is not on the same circuit as 'x'.
Your answer
Follow this Question
Related Questions
Is this how i do a Button activated teleporter. 1 Answer
Jump Further When Key Is Held Down 1 Answer
Input not working in-build. 0 Answers
Keyboard and mouse inputs not working 1 Answer
Why does GetKeyDown("[5]") fail? 1 Answer