How to Map Keyboard & Mouse to a Virtual Controller Using vJoy & UJR
Playing flight simulators, racing games, or space exploration titles with a binary keyboard can feel stiff and jarring. By combining the vJoy virtual driver with feeder software like Universal Joystick Remapper (UJR) or FreePIE, you can transform smooth mouse gestures into genuine analog axes (pitch, roll, yaw) and assign keyboard keys to progressive steering.
The Architecture: Driver vs. Feeder
To successfully map mouse and keyboard to a game, understand the two-part system:
- The Driver (vJoy): Creates the virtual joystick hardware device inside Windows that games recognize.
- The Feeder (UJR / FreePIE): Reads your mouse movement and keypresses in real-time and feeds their coordinates into vJoy's virtual axes and buttons.
Step 1: Install and Enable vJoy Device 1
- Download and install vJoy from the Official Download Page.
- Launch Configure vJoy from the Start Menu.
- Enable Device 1, set Axes to X, Y, Z, and Rz, and enable 8 to 16 buttons.
- Click Apply and verify in
joy.cplthat the controller displays OK.
Step 2: Download Universal Joystick Remapper (UJR)
Universal Joystick Remapper (built on AutoHotkey) is a lightweight, battle-tested feeder application for vJoy:
- Download the UJR archive and extract it to a folder such as
C:\Games\UJR\. - Run
UJR.exe. The status header should display "vJoy is installed and operational".
Step 3: Mapping Mouse Movement to Virtual Analog Axes
To steer aircraft or vehicles smoothly with your mouse:
- In UJR, switch to the Axes 1 tab.
- Locate Virtual Axis 1 (X) (traditionally Roll or Steering).
- Set the input source to Mouse X.
- Adjust the Deadzone slider (typically 2% to 5%) to prevent jitter when your hand is stationary.
- Set Virtual Axis 2 (Y) (Pitch or Throttle) to Mouse Y, and check Invert if you prefer standard aviation flight controls.
Step 4: Mapping Keyboard WASD for Progressive Steering
If you prefer keyboard steering with smooth interpolation rather than sudden full-lock turns:
- In UJR, select an axis and click Bind next to the positive and negative directions.
- Press A for negative X (steer left) and D for positive X (steer right).
- Configure the Linearity / Curve setting to 1.5. This ensures that brief taps of A produce small, delicate adjustments while holding the key down ramps up to full lock.
Step 5: Mapping Buttons and Triggers
- Switch to the Buttons 1 tab in UJR.
- Click the Bind button next to Virtual Button 1, then press your desired physical key (e.g., Spacebar or Left Mouse Click).
- Repeat for primary triggers, weapons, landing gear, or handbrake.
- Save your profile as
Flight_Sim_Profile.ini.
Testing Your Setup
Keep UJR running in the background, open joy.cpl, and move your mouse or press mapped keys. You will see the crosshairs glide smoothly across the testing grid. For advanced setups with Steam or anti-cheat games, read our Game Compatibility & Troubleshooting Guide.