LazyMouse is a Windows application that converts Xbox controller input into mouse and keyboard events and was submitted as CS50 Final Project. This project demonstrates the use of the XInput API to interface with gaming hardware and translate analog inputs into precision cursor control. Additionally it supports text/keyboard input via morse code.
- Mouse Movement: Control mouse cursor with the left analog stick
- Precision Control: Hold LT to move the cursor at 20% speed for fine adjustments
- Mouse Scrolling: Scroll using the right analog stick
- Button Interactions: Map Xbox buttons to mouse clicks and keyboard actions
- Morse Code Mode: Toggle between mouse control and Morse code text input via the Y button
- Debug Mode: Real-time display of controller input values for development
- Windows OS
- Xbox controller(360, one or series X) connected via USB or Bluetooth
- req. C++17 and g++ compiler
./build.batAlternatively, use CMake 3.16 or newer with a Windows C++ compiler (MSVC or MinGW):
cmake -S . -B build
cmake --build build --config ReleaseMSVC places main.exe in build/Release; MinGW places it in build.
CMake copies config.ini beside the executable. Run from that directory to use
the copied configuration.
# Normal mode
./main.exe
# Debug mode (displays controller input values)
./main.exe -debugYou can manually adjust the Cursor Speed, Scroll Speed, and Deadzone in the config.ini file by modifying the corresponding values to suit your preferences.
- Left Stick: Move mouse cursor
- LT (hold): Precision cursor movement at 20% speed
- Right Stick: Scroll
- Y Button: Toggle between mouse mode and Morse code mode
- Other Buttons: Mouse clicks and keyboard interactions (see
interactions.cpp)