| View previous topic :: View next topic |
| Author |
Message |
moavia hassan
Joined: 19 Nov 2004 Posts: 14
|
Posted: Mon Nov 22, 2004 1:36 am Post subject: Remapping Keys |
|
|
| I want to remap game keys with GetKeyState function in windows 98. How Can I improve the sensitivity of this function.I am using GetKeyState function but Sometimes i have to press a key 2 or 3 times to be active.Kindly help me. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Mon Nov 22, 2004 3:30 am Post subject: |
|
|
| You're sure regular hotkeys don't work? If not, try using GetKeyState in a loop with either "Sleep 0" or "Sleep 10" also in the loop. If you have an example loop already, feel free to post it. |
|
| Back to top |
|
 |
moavia hassan
Joined: 19 Nov 2004 Posts: 14
|
Posted: Tue Nov 23, 2004 2:02 am Post subject: Remapping Keys |
|
|
Thankx Chris.Here's the code
Again:
GetKeyState, state, Alt
If state = D
{
Sleep,200
Loop, 6
{
Send, {1 5}
Sleep, 200
}
}
Goto, Again |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Tue Nov 23, 2004 12:04 pm Post subject: |
|
|
I'm not sure exactly the effect you're trying to achieve, but try this: | Code: | SetTimer, WatchAltKey, 10
return
WatchAltKey:
GetKeyState, state, Alt
if state = U
return
Loop, 6
{
Send, {1 5}
Sleep, 200
}
return | If it's not correct, please describe the cause-and-effect behavior you wish to achieve. |
|
| Back to top |
|
 |
|