| View previous topic :: View next topic |
| Author |
Message |
supercharger Advanced Cheater
Reputation: 0
Joined: 06 Aug 2009 Posts: 61
|
Posted: Wed Oct 28, 2009 8:13 am Post subject: how does a game read keyboard command ? |
|
|
if i want to change the default key in a game, like use key M to replace key N, how can find the ASM code for keyboard command ?
there are other ways to change key command, such as 3rd party keyremapper, but i like to directly change the codes of the game, more efficient and better response.
|
|
| Back to top |
|
 |
Guy Expert Cheater
Reputation: 0
Joined: 30 May 2009 Posts: 187
|
Posted: Wed Oct 28, 2009 9:21 am Post subject: Re: how does a game read keyboard command ? |
|
|
| mlracing wrote: | if i want to change the default key in a game, like use key M to replace key N, how can find the ASM code for keyboard command ?
there are other ways to change key command, such as 3rd party keyremapper, but i like to directly change the codes of the game, more efficient and better response. |
It depends on how the game detects keyboard input; common functions may deal with DirectX input, the GetAsyncKeyState function, etc.
Either way, you'll have to hook the get keyboard input function, check for the 'M' key being pressed, then replace it with the 'N' key.
_________________
Has anyone seen Hitler around..? If so, PM me! |
|
| Back to top |
|
 |
supercharger Advanced Cheater
Reputation: 0
Joined: 06 Aug 2009 Posts: 61
|
Posted: Wed Oct 28, 2009 9:31 am Post subject: |
|
|
thanks
but , specificly, how do i make the hook ?
|
|
| Back to top |
|
 |
p99 Master Cheater
Reputation: 0
Joined: 21 Jan 2007 Posts: 271
|
|
| Back to top |
|
 |
supercharger Advanced Cheater
Reputation: 0
Joined: 06 Aug 2009 Posts: 61
|
Posted: Wed Oct 28, 2009 9:55 am Post subject: |
|
|
| right, this way is out of my range, i would prefer to do it in other ways.
|
|
| Back to top |
|
 |
AIva1110 Advanced Cheater
Reputation: 0
Joined: 16 Sep 2009 Posts: 56 Location: The Void
|
Posted: Wed Oct 28, 2009 11:48 am Post subject: |
|
|
you can also patch it, all messages program processes are just constant numbers that are assigned IDs.
For example M key might have internal value 0x100 and N might have 0x200, when you find where it processes the input just change the values and that's it. Not going to get into all the details just explaining the concepts.
_________________
|
|
| Back to top |
|
 |
|