Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Cloudperry/leetmouse

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About this fork

This is a fork of Leetmouse I quickly made to fix some stability problems I had with Leetmouse. Compared to Leetmouse, it lacks updating acceleration parameters while the module is running. Other than that, its a fully working implementation of Leetmouse. This version also adds sensor rotation, but its not very accurate. This fork won’t be updated anymore because I found YeetMouse to be much better, and I don’t like working on kernel code.

Description

The LEETMOUSE kernelmodule enables quake-live like acceleration for your mouse on Linux and is heavily inspired by previous works from Povohat’s mouse driver for Windows. LEETMOUSE basically fuses the original Linux USB mouse driver code with the acceleration code-base and has been initially developed by Christopher Williams. Since the original work was in a rough state and seem to have been abandonned, this fork has been started.

Preparation & Configuration

  • Clone this repository, fetch external dependencies, copy driver/config.sample.h to driver/config.h and edit it in your favorite text editor. Change the defines at the top of config.h to match your desired acceleration settings.
    git clone https://github.com/systemofapwne/leetmouse.git
    cd leetmouse
    git submodule init && git submodule update
    cp driver/config.sample.h driver/config.h
        
  • Make sure, you have dkms, udev, the required build toolchains (e.g. base-devel on Arch or build-essentials on Debian) and as well the linux-headers for your kernel installed.
    # Arch/Manjaro/...
    sudo pacman -S dkms udev base-devel linux-headers
    # Debian/Ubuntu/...
    sudo apt update && sudo apt install dkms udev build-essentials linux-headers-$(uname -r)
        

Installation & Uninstallation

Arch/Manjaro

Installation

# Create the PKGBUILD, copy associated files and run makepkg
./scripts/build_arch.sh
# Run pacman on the created package
sudo pacman -U pkg/build/leetmouse*.zst

All your mice should now be bound to this driver. They will also automatically bind to it after a reboot. If this did not work, run sudo /usr/lib/udev/leetmouse_manage bind_all

Uninstallation

sudo pacman -R leetmouse-driver-dkms

All your mice should now be bound to the generic usbhid driver again.

Debian/Ubuntu

Installation

# Create the DEB package
./scripts/build_deb.sh
# Run dpkg to install the package
sudo dpkg -i pkg/build/leetmouse*.deb

All your mice should now be bound to this driver. They will also automatically bind to it after a reboot. If this did not work, run sudo /usr/lib/udev/leetmouse_manage bind_all

Uninstallation

sudo apt remove leetmouse

All your mice should now be bound to the generic usbhid driver again.

Other distros

Other distributions’ package-managers are not yet supported and thus need a manual installation. Feel free to contribute to an installation routine for your distro. The installation is not yet very polished but eventually will become so.

Installation Determine the current version of this module by examining the variable DKMS_VER in the Makefile. It can be e.g. 0.9.0 Run the following commands to build and install the kernel module

# Install the driver and activate the dkms module
sudo make setup_dkms && sudo make udev_install
sudo dkms install -m leetmouse-driver -v 0.9.0 # Enter the version you determined from the Makefile earlier in here

All your mice should now be bound to this driver. They will also automatically bind to it after a reboot. If this did not work, run sudo /usr/lib/udev/leetmouse_manage bind_all If this still does not work, there is a major problem

Uninstallation You again need to know then version as described above for the installation

# Unbind all mice from the driver
sudo /usr/lib/udev/leetmouse_manage unbind_all
# Uninstall the driver
sudo dkms remove -m leetmouse-driver -v 0.9.0 --all  # Enter the version you determined from the Makefile earlier in here
sudo make remove_dkms && sudo make udev_uninstall

Unplug and replug your mouse or reboot to have your mice bound back to the generic usbhid.

Manual compile, insmod, bind

If you want to compile this module only for testing purposes or development, you do not need to install the whole package to your system.

Compile the module, remove previously loaded modules and insert it.

make clean && make
sudo rmmod leetmouse
sudo insmod ./driver/leetmouse.ko

If you did not install the udev rules before via sudo make udev_install you need to manually bind your mouse to this driver. You can take a look at /scripts/bind.sh for an example on how to determine your mouse’s USB address for that. However using the udev rules for development is advised.

TODOS

Migration to Fixed-Point arihtmeticCurrent priority
GUI to configure the acceleration parametersNext priority
AUR package releaseOnce it reaches version 1.0 (basically after having a working GUI)
Feature parity with Povohats driver and later even RawAccelWhen I find time - Definitely after aboves milestones
External interface for dynamically pushing acceleration parametersDone
Fixing the only vertical srolling bugDone
Easier installation & bindingDone
DKMS supportDone
PKGBUILD for Arch based systemsDone
dpkg package for Debian based systemsDone

About

A fork of the Linux mouse driver with acceleration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 68.6%
  • C++ 16.3%
  • Shell 10.3%
  • Makefile 4.8%