I am currently trying to detect which keys are currently pressed at any given time. Like others have said, I used the keydown
and keyup
events and log the keyCode
s to an object. I also added console.log
statements in my keydown
and keyup
listeners. Currently, everything works well except when three keys are pressed simultaneously in a triangular shape (on a QWERTY keyboard: ["T", "G", "Y"]
, ["4", "5", "R"]
, etc.), the keys don't log as expected: either one or two logs, or none of them logs. I wonder if there's a way to get around whatever limitation is causing this?
this could possibly be a keyboard ghosting
which an issue caused by hardware limitations (keyboard),
you should try to test your keyboard here https://www.microsoft.com/applied-sciences/projects/anti-ghosting-demo