This project is read-only.

InputManager.GetKeyboard().GetState() returns wrong states for isKeyUp and isKeyDown

Feb 6, 2011 at 2:38 PM

I tried using the PC Keyboard through the InputManager but it produces the wrong results when checking the keyboard state for IsKeyUp or IsKeyDown.


produced the opposite of the expected result. i.e. When the button was pressed IsKeyDown returned false and vice versa.

XNA Frameworks Keyboard.GetState() however produces the correct results:

No worries I just use the XNA Frameworks keyboard. I thought it was worth reporting the issue though.
(I've used Nuclex Framework R1323)

Thanks for all the work done on Nuclex.Input :o)


Feb 6, 2011 at 4:13 PM

You're right, I switched two statements in BufferedKeyboard.cs (lines 161 and 166). Fix is committed to SVN :)

It's always worth reporting - especially well researched bugs like this one where I spot the problem and fix it in under a minute :)


Feb 7, 2011 at 1:21 PM


Downloaded the new source. Works now.