Mouse to Joystick with FreePIE and vJoy
The mouse is the most precise pointing device on your desk, and some games would be far easier to steer or look around in if only they accepted it as a joystick. FreePIE plus vJoy makes that happen: a small script reads your mouse and writes its movement into a virtual joystick that the game cannot tell from hardware. This guide covers how the scripted feeder works, the setup steps, and an honest caveat for truck-sim players before they start.
What FreePIE is
FreePIE — the Programmable Input Emulator, by Anders Malmgren — is a scripted feeder. Instead of a fixed mapping screen, you write a short script that runs continuously: read some input, do some arithmetic if you like, write the result to an output. Its classic, most-shared use is exactly this page’s subject — mouse-to-vJoy scripts that turn mouse movement into virtual joystick axes, used for camera control and steering in games that lack mouse support for those jobs. Community guides have paired FreePIE with vJoy for this for years, which means working example scripts are easy to find and adapt.
Because the output is scripted, the mouse behaviour is yours to define. A typical camera script adds mouse movement to an axis value while it is enabled, so the view stays where you left it; a typical steering script recentres the axis when you stop moving, like a self-centring wheel. Scripts commonly include a toggle key that switches the mouse feeding on and off, so you can use the mouse normally in menus and only hand it to vJoy while driving or flying. Those choices live in the script, not in a settings panel — which is both FreePIE’s power and its learning curve.
First, the ETS2 caveat
Euro Truck Simulator 2 and American Truck Simulator players land on this page often, so this needs saying early: ETS2 and ATS have native mouse steering built in. You do not need FreePIE, vJoy or this guide for basic mouse steering in those games — turn it on in the game’s own options. The vJoy route only becomes relevant for truck sims in specific setups, such as phone-as-wheel and other virtual-steering arrangements, or when you want the mouse presented as a joystick for a different reason entirely. For every other game that simply has no mouse steering or mouse look, read on — that is what this chain is for.
Install order and core setup steps
- Install vJoy from our download page and configure a device in vJoyConf — two axes (X and Y) cover most mouse scripts, one for horizontal and one for vertical.
- Install FreePIE and open it. Its last release was in 2019, so download it from its project page and expect a finished, stable tool rather than a developing one.
- Load an example mouse-to-vJoy script, or write your own following the same shape: each cycle, read the mouse movement, apply it to the vJoy axis values, and respect your toggle key. Working through a shared example script line by line is the fastest way to learn the pattern.
- Run the script and open the vJoy monitor. Moving the mouse should sweep the axes exactly as the script intends — centred when it should centre, holding position when it should hold. Fix the script here, not in the game.
- Bind the vJoy axes in your game (steering, or camera look, depending on the script) and test in a safe corner of the game. Adjust the script’s sensitivity numbers in small steps until the movement feels natural.
- Note your toggle key on a sticky note if you must. Forgetting which key hands the mouse back is the rite of passage for every FreePIE user.
Tuning the feel
Two numbers decide whether a mouse script feels right: how much axis value each unit of mouse movement adds, and how the axis behaves when you stop moving. Change them one at a time, in the monitor, before judging them in the game. Too twitchy usually means the per-movement step is too large; a view or wheel that keeps drifting usually means the script is still adding stale movement or not holding and recentring the way you intended. Keep notes as you tune — a script you adjusted across three evenings without writing down what each number does becomes a script you are afraid to touch, and FreePIE setups live or die by small, understood edits.
Best use case
This chain is at its best adding mouse control to games that never had it: older driving and flight titles where steering or looking is locked to keys or a hat switch, and sims where a smooth analogue axis transforms an input the game only offered digitally. It is also a fine prototyping tool — if you are wondering whether mouse steering would suit a game before buying a wheel, an evening with FreePIE answers the question for free. The truck-sim context above is the exception that proves the rule: where native mouse support exists, native wins.
Limitations
- Legacy-stable software. FreePIE’s last release was in 2019. The community’s scripts still work, but the tool is unmaintained and its scripting is the interface — there is no point-and-click fallback if a script misbehaves.
- Scripting is required. You can start from shared examples, and for mouse-to-joystick those examples cover most needs, but you will still read and edit script code.
- The mouse is shared. While a script is feeding vJoy, your mouse is doing two jobs. The toggle pattern exists precisely because of this; set it up before you need it in a menu mid-game.
- DirectInput on arrival. The game receives a vJoy DirectInput device. XInput-only games need another layer between vJoy and the game.
Next steps: driver first from the download page, the full feeder list in the vJoy feeder tools hub, and the sibling guide that shares this feeder is our OpenTrack and FreePIE head tracking chain — same scripting tool, driven by your head instead of your mouse.
