According to Phoronix, libinput 1.30-rc1 has just been released with experimental Lua plugin support that fundamentally changes how input devices can be customized. These plugins sit between libinput and the kernel, allowing modification of the evdev event stream from devices. They can change device capabilities, modify selected events, or even disable certain internal libinput features. The release includes example plugins in the source tree’s plugins directory, and they need to be enabled via the new libinput_plugin_system_load_plugins() call. There’s also a temporary -Dautoload-plugins meson option that automatically loads plugins if the caller doesn’t, though this might be removed later. This represents a significant shift in how libinput handles edge cases and custom hardware requirements.
This Changes Everything For Weird Hardware
Here’s the thing about libinput – it’s been pretty opinionated about how input devices should behave. That’s great for consistency, but terrible when you’ve got that one weird mouse with bizarre button debouncing or a touchpad that doesn’t follow the rules. Before this, you were basically stuck with whatever libinput decided was “correct” behavior. Now? Developers can write Lua scripts to handle exactly those edge cases without waiting for upstream support.
Think about all those niche gaming mice, specialized input devices, or just plain weird hardware that never quite worked right on Linux. This plugin system could finally solve those headaches. The fact that plugins can modify events before libinput even sees them means you’re not fighting the library’s assumptions anymore. It’s like having a translator that can make your weird hardware speak libinput’s language perfectly.
Where This Could Lead
So what does this mean long-term? Basically, we might see a whole ecosystem of community-maintained plugins for specific devices. Someone with a problematic mouse could write a plugin, share it, and suddenly that hardware works perfectly for everyone. No more waiting for distro updates or hoping the libinput maintainers will prioritize your specific hardware issue.
But there’s a catch, right? This much flexibility comes with potential stability risks. What happens when plugins conflict? How do we ensure they don’t break between libinput versions? The temporary autoload option suggests the developers are being cautious about this becoming a support nightmare. Still, this feels like one of those features that could quietly revolutionize Linux input handling for power users and hardware enthusiasts.
