This directory contains the alpha build of MouseDrive, a Windows console utility that maps mouse movement and button events onto a virtual joystick exposed by the vJoy driver. The goal is to give racing simulators and other titles that only recognise joystick input a way to interpret mouse steering, throttle, and braking.
- Relative mouse X movement becomes steering on the joystick X axis (middle mouse recentres instantly).
- Left and right mouse buttons drive throttle and brake curves with configurable ramp, drop, and trail behaviour.
- W/S keyboard keys are forwarded to joystick buttons for quick gear-style inputs.
- Raw Input capture with delta clamping avoids cursor lock issues while filtering large spikes.
- vJoy integration occurs through dynamic loading, so the executable stays portable.
Read REQUIREMENTS.md for the complete list of driver and toolchain prerequisites needed to compile and run this alpha build.
- Install the dependencies noted in the requirements document (Visual Studio with Desktop C++, Windows SDK, vJoy driver and SDK).
- Open
MouseDrive V0.1-Alphaas a project folder in Visual Studio or work from a Developer Command Prompt in this directory. - Build the single translation unit
MouseDrive.cpp. The file already pulls inComctl32.libvia#pragma commentand loadsvJoyInterface.dllat runtime. - Compile with C++17 support. Both
DebugandReleaseconfigurations produce a console application.
cl /std:c++17 /EHsc "MouseDrive.cpp" /link comctl32.libEnsure vJoyInterface.dll is discoverable on the system path or next to the resulting executable before running the binary.
- Configure a vJoy virtual device with X, Y, and Rz axes enabled plus at least two buttons.
- Launch
MouseDrive.exe. The console prints the control scheme and remains active while the loop is running. - Drive using the mouse and buttons:
- Mouse moves steer; middle click snaps the wheel back to centre.
- Left mouse button applies throttle with exponential shaping tied to steering angle.
- Right mouse button engages progressive braking with hold and release tuning.
WandSkeys toggle joystick buttons 1 and 2 (e.g., for gears).
- Bind your game to the vJoy device axes and buttons instead of the physical mouse.
All runtime tuning lives in the Config struct inside MouseDrive.cpp. Parameters cover mouse sensitivity, throttle/brake curves, and timing for hold/release phases. Rebuild after editing the struct to bake new defaults into the executable.
MouseDrive/
├─ MouseDrive.cpp # Single translation unit for the alpha console build.
├─ LICENSE
├─ README.md # This document.
├─ ROADMAP.md # Planned development milestones.
└─ REQUIREMENTS.md # Dependency checklist and build tooling notes.
- File issues with reproduction steps, OS version, and vJoy configuration details.
- Fork and submit pull requests that keep changes focused; mention which roadmap item you are targeting.
- Keep documentation in sync with the behaviour of
MouseDrive.cppwhen you add or adjust features.
Copyright © 2025 Toxpox.
This project is MIT License licensed.