Pretty much what the "Mouse Keys" that can be enabled via the Ease of Access Centre do, only those are useless because they are extremely slow and have a delay at the start.

Some more info: There's a game I play that is similar to a flight simulator, but yaw and pitch are controlled by the mouse and there's no option in-game to remap this to keyboard buttons. So what I want is that if I press the 4 key on the numpad (or some other key, I don't care) then the game reacts as if I were moving the mouse to the left, with no delay or acceleration or whatever, just the way it works in normal flight sims where you use a keyboard by default.

I don't need the diagonal directions, just up/down and left/right would be enough. Since I won't be able to control the cursor speed I'll need some way to set a fixed speed that feels right in the game, preferably separately for each axis.

Edit: Since mapping some keys to joystick axes would also work I tried to find a program that does this, but no luck. It seems everyone needs to map joystick buttons to keys on the keyboard, but not the other way around. Surely this can't be that difficult?

  • I tried editing the registry entry for mousekeys and setting the acceleration from it's lowest setting (1000) to 0, but it just continued working as if it was 1000. Can you remap the Pitch and Yaw to anything else, such as a Console Controller or Joystick? – Jack Jul 27 '15 at 11:37
  • I can choose between mouse and joystick. I don't have a joystick so I haven't tried how it works but if I could map a key to a joystick direction then that would probably solve my problem as well. – And G Jul 27 '15 at 12:13

The solution is called AutoHotkey and a beginner's tutorial can be found here.

This is my script:


SetTimer, Main, 1

if (GetKeyState("Up", "P"))
    MouseMove, 0, -25, 0, R
if (GetKeyState("Down", "P") or GetKeyState("NumpadClear", "P"))
    MouseMove, 0, 25, 0, R
if (GetKeyState("Right", "P"))
    MouseMove, 50, 0, 0, R
if (GetKeyState("Left", "P"))
    MouseMove, -50, 0, 0, R

NumpadClear is the middle numpad key, so this allows to use a WASD pattern on the numpad (8456).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.