Victor Chelaru
Victor Chelaru

Reputation: 4837

XNA Keyboard.GetState() not reading number/character keys, but reading other keys

Out of the blue my game stopped responding to key input. At first I thought it was some logic error I had introduced, but I eventually commented out all of my custom code and was left with an empty XNA Game class, with the exception of this code that I added to see what might be happening:

var state = Keyboard.GetState(); foreach(var key in state.GetPressedKeys()) { Console.WriteLine(key); }

The following keys register input just fine:

However, none of the other keys are picked up by XNA. These include:

I know this might be a long shot but has anyone else experienced this, or does anyone know what might be causing it?

I've tried restarting Visual Studio, rebuilding my project, and restarting my computer. I've been developing XNA games since XNA 1 and this is the first time I've ever experienced this.

Edit: I plugged in a USB keyboard to see if it could somehow be hardware related, but that didn't solve the problem either.

Upvotes: 2

Views: 271

Answers (1)

Victor Chelaru
Victor Chelaru

Reputation: 4837

It seems like this was caused by Synergy software (http://synergy-project.org/). I recently installed Synergy 1.7.6 and this is the first time I've run XNA games since installing it. I ended the background tasks for Synergy and my game once-again started reading input.

Upvotes: 2

Related Questions