Skip to content

AngryNui/hid-chandbreak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hid-chandbreak

Out-of-tree HID kernel module for the common USB sim handbrake that identifies as LeafLabs Maple / 1eaf:0024.

What it does

The stock Linux HID mapping exposes confusing axes for this device. Based on the captured HID descriptor and raw reports, the real handbrake signal is the second 10-bit slider field in report 0x14, while button 1 is exposed separately.

This module bypasses the generic HID input mapping and instead creates a clean Linux input device named hid-chandbreak with:

  • BTN_TRIGGER
  • ABS_RZ in the range 0..1023

Current scope

This first version is intentionally narrow:

  • Vendor/Product: 1eaf:0024
  • Report ID: 0x14
  • One button (data[1] bit 0)
  • One axis (slider2 from bits 54..63 of data[5..12])

Build

The CachyOS kernel is built with the full LLVM toolchain (Clang + LLD), so the module must be built the same way. Using GCC or GNU ld will fail because the kernel's build flags contain LLVM-specific options.

make LLVM=1

Load

sudo insmod hid-chandbreak.ko

If the device is already bound to hid-generic, manually rebind it:

  1. Find the HID device path:
    ls /sys/bus/hid/devices
  2. Inspect candidates until you find the one with 1EAF:0024 in uevent:
    grep -H . /sys/bus/hid/devices/*/uevent
  3. Override and rebind:
    echo hid-chandbreak | sudo tee /sys/bus/hid/devices/<DEV>/driver_override
    echo <DEV> | sudo tee /sys/bus/hid/drivers/hid-generic/unbind
    echo <DEV> | sudo tee /sys/bus/hid/drivers/hid-chandbreak/bind

Verify

sudo evtest

Look for a device named hid-chandbreak and verify that:

  • pulling the handbrake changes ABS_RZ
  • the end-stop button toggles BTN_TRIGGER

Notes

  • This module deliberately uses HID_CONNECT_HIDRAW only, so generic HID input mapping should not create duplicate axes.
  • hidraw remains available for debugging.
  • A dkms.conf and PKGBUILD are included for permanent installation via DKMS or makepkg.
  • AI-sloped :)

About

DKMS kernel driver for USB sim handbrake devices based on LeafLabs Maple (1eaf:0024)

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors