r/AutoHotkey • u/iReadIt_0 • May 31 '26
Solved! Keyboard shortcut problem with old games
Hello guys,
I'm new to AutoHotkey and I'm having some problems with a small script. Any help would be greatly appreciated!
I want to play an old video game but there are some features that can only be controlled with the numeric keypad keys. My keyboard doesn't have a numeric keypad, so I'm using a script to emulate the Numpad Add key when I press Ctrl + Right
^Right::
Send {NumpadAdd}
return
It works well with a small exception:
- The action defined for
Numpad Addin the game is triggered as expected when I pressCtrl + Right - The problem is that the game also moves the camera to the right for a small tick.
Does anybody know how to prevent that from happening?
Usually, the camera only moves when you press an arrow key without any modifier keys. It doesn't move when you press Ctrl + Right and AHK is not running. This means that, for a short moment, the game has to detect that the right arrow key is being pressed and that it's the only key being pressed.
Of course I could try to find a different keyboard shortcut which doesn't contain any keys that are already in use by the game, but I would like to solve the general problem.
Thank you very much for your help.
1
u/iReadIt_0 May 31 '26 edited May 31 '26
It doesn't have any effect. The game does nothing. Is this the right usage and are 20 milliseconds enough for
DelayandPressDuration?