Accept keyboard input when game is not in focus?
Posted
by
Corey Ogburn
on Game Development
See other posts from Game Development
or by Corey Ogburn
Published on 2011-06-22T22:58:02Z
Indexed on
2011/06/23
8:30 UTC
Read the original article
Hit count: 426
I want to be able to control the game via keyboard while the game does not have focus... How can I do this in XNA?
EDIT: I bought a tablet. I want to write a separate app to overly the screen with controls that will send keyboard input to the game. Although, it's not sending the input DIRECT to the game, it's using the method discussed in this SO question:
http://stackoverflow.com/questions/6446085/emulate-held-down-key-on-keyboard
To my understanding, my test app is working the way it should be but the game is not responding to this input. I originally thought that Keyboard.GetState() would get the state regardless that the game is not in focus, but that doesn't appear to be the case.
© Game Development or respective owner