Adding more ABS axes and BTN spaces to evdev
From: Vicki Pfau <hidden>
Date: 2025-06-17 02:43:28
Hello, I've recently been doing some bringup work on some flight stick and racing wheel controllers and have run into a few issues with how to expose it to userspace that I'm not sure the best way to solve. For flight sticks, the protocol I'm working with allows for up to 64 buttons on top of a set few, as well as up to 16 axes. There doesn't appear to be good spaces within within either ABS or BTN for these. Though I don't know any devices that use that many, I am worried about the space for axes especially. Though I can probably fit a few after ABS_MISC, but really not that many. More directly important, though, is the racing wheel controllers. The protocol specifies four types of axes and one thing that would fit fairly well as an axis: accelerator, brake, clutch, handbrake, and shifter. It looks like Windows treats the shifter as a series of buttons, one for each location on the shifter, but that's a little less desirable than using an axis for it in my opinion. Regardless, there's no good place to map clutch and handbrake. For clutch, at least, I would assume the best approach would actually be to add a new axis: ABS_CLUTCH, perhaps at 0x1d. Would this be a good idea? And if so, would adding ABS_SHIFTER and/or ABS_HANDBRAKE at 0x1e/0x1f also make sense? Barring that, I can use a few ABS_MISC axes, but that is perhaps suboptimal for conveying intent to userspace programs. I looked around other devices in the kernel to try to figure out what prior art there was for this stuff, without much luck. I saw ABS_RUDDER in use in a few places, but it wasn't quite clear to me what that's being used for without the devices in question. I'm also not clear on what the HID driver does for things like this. How should I start moving forwards with this? Thanks, Vicki