Hi all,
First i m clearing one thing. This question is a general windows question and it has nothing to do with programming.
I want to know that how can i send keyboard commands to a game based on Direct-X or OpenGL.
I have tried SendInput and keybd_event API to send keyboard commands but it aint working on games but working perfectly on normal windows form based applications. Sending messages to a game aint work, because direct input ignores windows messages, it communicated directly with the device drivers. Please Please just tell me any way to send keyboard keys and mouse events to a game. Again only the way i m not much interested in code, but code ll be appreciated.
Example Scenario: I m playing Need For Speed. Now my application will send it a key which is key Up, and car ll be accelerated. These commands will be sent from some kind of form based application.
Please tell me any way or any technique to do this.
Thanks a lot in advance to the readers and to those who will answer to this post.
PS: I have googled for 3-4 hours to find the answer of this question SO please dont suggest me to google about it first. Thank you.
First i m clearing one thing. This question is a general windows question and it has nothing to do with programming.
I want to know that how can i send keyboard commands to a game based on Direct-X or OpenGL.
I have tried SendInput and keybd_event API to send keyboard commands but it aint working on games but working perfectly on normal windows form based applications. Sending messages to a game aint work, because direct input ignores windows messages, it communicated directly with the device drivers. Please Please just tell me any way to send keyboard keys and mouse events to a game. Again only the way i m not much interested in code, but code ll be appreciated.
Example Scenario: I m playing Need For Speed. Now my application will send it a key which is key Up, and car ll be accelerated. These commands will be sent from some kind of form based application.
Please tell me any way or any technique to do this.
Thanks a lot in advance to the readers and to those who will answer to this post.
PS: I have googled for 3-4 hours to find the answer of this question SO please dont suggest me to google about it first. Thank you.
Comment