A Windows application that maps Xbox controller inputs to mouse movements and actions, allowing you to control your cursor with a gamepad.
- Mouse Movement: Use the right analog stick to move the cursor
- Scroll Control: Use LT/RT triggers to scroll up/down
- Mouse Buttons:
- Left Stick Press → Right Click
- Right Stick Press → Left Click
- Both Sticks Press → Middle Click
- Virtual Keyboard: Press both thumbsticks simultaneously to open the on-screen keyboard
- Auto-Detection: Automatically detects and connects to available controllers
- Multi-language Support: English, 简体中文,繁體中文,日本語
- Modern UI: Clean, transparent window design with Windows 11 styling
- Windows 10 version 19041.0 or higher
- .NET 11.0 Runtime
- Xbox controller (or compatible DirectInput controller)
Download the latest release from the Releases page. The application is published as a self-contained single-file executable, so no additional dependencies are needed.
# Clone the repository
git clone <repository-url>
cd Controller2Mouse
# Build the project
dotnet build -c Release
# Publish as single-file executable
dotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=trueThe published executable will be in bin/Release/net11.0-windows10.0.26100.0/win-x64/publish/.
- Launch
Controller2Mouse.exe - Connect your Xbox controller via USB or Bluetooth
- The application will automatically detect the controller
- Click "Start Mapping" to begin controlling the mouse
- Click "Stop Mapping" or close the application to exit
| Controller Input | Mouse Action |
|---|---|
| Right Stick | Move Cursor |
| LT Trigger | Scroll Up |
| RT Trigger | Scroll Down |
| LT + RT | Middle Click |
| Left Stick Press | Right Click |
| Right Stick Press | Left Click |
| Both Thumbsticks Press | Open Virtual Keyboard |
Advanced users can modify the following constants in ControllerToMouseMapper.cs:
Deadzone: Controller stick deadzone thresholdSensitivityX: Horizontal mouse sensitivity (default: 0.0005f)SensitivityY: Vertical mouse sensitivity (default: 0.0005f)ScrollSensitivity: Scroll wheel sensitivity (default: 0.1f)
- Framework: .NET 11.0 with WPF
- Input Library: Windows.Gaming.Input (Built-in WinRT API)
- Platform: Windows 10/11
Controller2Mouse/
├── App.xaml # Application entry point
├── MainWindow.xaml # Main UI window
├── ControllerToMouseMapper.cs # Core controller-to-mouse mapping logic
├── MouseSimulator.cs # Windows SendInput API wrapper
├── Languages/ # Localization resources
│ ├── en-US.xaml
│ ├── zh-CN.xaml
│ ├── zh-TW.xaml
│ └── ja-JP.xaml
└── Controller2Mouse.ico # Application icon
# Debug build
dotnet build
# Release build
dotnet build -c Release
# Run the application
dotnet runController not detected:
- Ensure the controller is properly connected
- Try pressing any button to wake up the controller
- Check Device Manager for controller drivers
Cursor movement too fast/slow:
- Adjust
SensitivityXandSensitivityYvalues in the source code - Rebuild the application after changes
Application won't start:
- Ensure .NET 11.0 Runtime is installed
- Check Windows Event Viewer for error details
This project is provided as-is for educational and personal use.
- Built with Windows.Gaming.Input for modern gamepad support
- Uses Windows SendInput API for mouse simulation