Advertisement

Keyboard intercept, please help

Started by May 25, 2001 10:39 AM
2 comments, last by Pedro Ferreira 23 years, 8 months ago
Hi to all, my goal is make an application in vc++ that intercepts the keypresses that are appening in a game. Say for instance that in the game we or other person presses the "g" key, what I wanto is to intercept the keypress and instead of "g", send to the game the "a" key. How can I do this? Thanks, Pedro
Now i don''t want to second guess your methodology behind this action, but why would you want to do this, i mean in a game the person generally wants the key they press to do the action for the key that they pressed, the only thing i can think of is some kind of code system, anyway, if you wanted to do this you could use a loop and a switch but there are other ways, that''s just what came to mind first. hope it helped.
Advertisement
quote:
Original post by caffeineaddict

Now i don''t want to second guess your methodology behind this action, but why would you want to do this, i mean in a game the person generally wants the key they press to do the action for the key that they pressed, the only thing i can think of is some kind of code system, anyway, if you wanted to do this you could use a loop and a switch but there are other ways, that''s just what came to mind first. hope it helped.


quote:
Original post by caffeineaddict

Now i don''t want to second guess your methodology behind this action, but why would you want to do this, i mean in a game the person generally wants the key they press to do the action for the key that they pressed, the only thing i can think of is some kind of code system, anyway, if you wanted to do this you could use a loop and a switch but there are other ways, that''s just what came to mind first. hope it helped.



What I want is to be able to control the game from a remote PC.
Picture this: You have several toggle switches that do different things, now if I flip one switch to ON position it sends a signal to the PC. I want to send a signal to the game (keypress) corresponding to a key that the game reconizes.
Pedro

This topic is closed to new replies.

Advertisement