Joystick-like mouse control with the keyboard on Windows.
Mouse movement is controlled with the pl;' keys; scrolling is controlled with o[. Right ALT simulates left clicks, and , simulates right clicks. Holding ENTER will cause all movement to be slower.
Running kb-as-mouse launches a tray icon. The application can be terminated by right-clicking the icon, and paused/resumed by left-clicking the icon. Pause/resume is also possible with the APPLICATIONS/MENU key (looks like a hamburger icon).
Keys and physics customizations can be made via command-line options. Run the application with --help to get help on the command-line options available. The FAQ covers how to specify command-line options.
For some games, especially those which use joystick-like mouse controls for camera, yes. For games which require fast reactions and precision, kb-as-mouse may not be a great choice.
This demo is played on keyboard with the default configuration on an XPS 13 9370.
demo.webm.mov
The keyboard looks like this. Observe the APPLICATIONS/MENU key is accessible via Fn+Right CTRL.
Create a shortcut, and open properties for the shortcut. The command-line options can be appended to the Target line.
An example command-line options string might look like this: --slow-mod 0.3 --fps 240. Virtual key codes can be found at https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes. Specify --help to view the available command-line options.
Task Manager and many games are run in Administrator Mode (elevated privileges). Thus, to inject mouse actions into elevated applications, kb-as-mouse must also be run with elevated privileges.
To do this, right click and select “Run as adminstrator”. Optionally, this can be set as default on a shortcut.
AHK scripts can accomplish the same thing as kb-as-mouse, but customization requires far more additional work and learning the AHK scripting language.
On the other hand, Windows Ease of Access has a nice graphical UI, but the mouse movement is janky and customization is very little.
You'll want to grab the rain submodule with:
git submodule init
git submodule updatekb-as-mouse is set up as a Visual Studio project in build/, with the rain dependencies included.


