mapping gamepad controller onto mouse and keyboard
Overview
You may want to have a look at vJoy and Universal Control Remapper (UCR).
vJoy is a "virtual" (software-only) joystick and UCR is an application built with AutoHotkey that allows you to map keyboard and mouse input to vJoystick controls.
Example
-
Download and install vJoy (
vJoySetup.exe
). Don't worry about any of the optional install items (i.e. it's fine to leave them checked). Be patient. The installer may take a few minutes to fully complete.The instructions below use GitHub release version v2.1.8 Build 39 from the official vJoy GitHub repo. This version supports up through Windows 10 1803.
If you have a later version of Windows 10 (i.e. 1903), you may want to look at these forked Github project releases, specifically the one marked as v2.1.9.1.
Download and unzip UCR. Place it somewhere where you will be comfortable keeping it (it doesn't have an installer).
-
Open
UCR.exe
. On your first run, ensure that vJoy was loaded correctly by opening IOClasses → vJoy → Show vJoy Log from the main UCR menu bar. -
You should see a pop up that looks similar to the following:
-
Note the line that says
SCPVBus is not installed (Non fatal)
. Use IOClasses → vJoy → Install SCPVBus (Will Restart UCR) to install SCPVBus.This will open a command window that installs SCPVBus. As with the original vJoy driver installation, be patient. Wait for the command window to close and UCR to restart automatically.
-
Once UCR restarts, in the Profile ToolBox section (right-hand pane)
Add
a new profile and make certain it is highlighted. The new profile name should be reflected in theCurrent Profile
field near the top of the main UCR window (left-hand pane). -
From there, you will need to add the following plugins to the main UCR interface:
-
ButtonToAxis
[Remapper (Button to Axis)
] -
ButtonToAxis
[Remapper (Button to Axis)
] -
MouseToJoy
[Remapper (Mouse Axis to Joystick Axis)
]
These are added one at a time with thePlugin Selection
dropdown andAdd
near the top of the UCR interface.Set the
Low
andHigh
values of the firstButtonToAxis
toA
andD
respectively.Set the
Low
andHigh
values of the secondButtonToAxis
toW
andS
respectively.Leave the
MouseToJoy
settings as-is.
You may need to experiment with theAxis
settings in each plugin configuration, but theAxis
settings themselves should all be for the same joystick (e.g.vJoy 1
).Axis 1
(X),Axis 2
(Y) andAxis 3
(Z)/Axis 6
(Rz) worked for this example. Don't forget to save your configuration after making changes! -
For the rest of the vJoy buttons (including the D-pad), you will need to use multiple ButtonToButton [Remapper (Button to Button)]
plugins.
You can check you vJoy/UCR settings with joy.cpl
(Windows Joystick Control Panel). You should be able to find it with Windows Search.
To test your controls:
- Select e.g.
vJoy Devices
for the joystick selection and then clickProperties
. - While UCR is running, pressing
W
,A
,S
,D
and moving the mouse should affect theX Axis
/Y Axis
box target andZ Axis
/Z Rotation
indicators.
Related videos on Youtube
Joe Martin
Updated on September 18, 2022Comments
-
Joe Martin over 1 year
alot of programs map the keyboard and mouse buttons onto the gamepad. making the later send their input (i.e right joystick moves the mouse pointer, left joystick functions as WASD in games etc). i want to do the exact opposite. i want to map the gamepad controller onto the keyboard and mouse so the WASD will function as left joystick for controlling movement for example and the mouse will function as right joystick for camera.
i am on win 10.
-
harrymc over 4 yearsWindows or Linux?
-
Joe Martin over 4 yearsoh i added the OS in my post. it is win 10.
-