By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: libinput Preparing To Introduce A Lua-Based Plugin System For Modifying Devices/Events
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > Computing > libinput Preparing To Introduce A Lua-Based Plugin System For Modifying Devices/Events
Computing

libinput Preparing To Introduce A Lua-Based Plugin System For Modifying Devices/Events

News Room
Last updated: 2025/05/21 at 2:39 PM
News Room Published 21 May 2025
Share
SHARE

The libinput input handling library that’s used by both X11 and Wayland based environments on the Linux desktop is preparing to introduce a Lua-based plug-in system. Via Lua scripts it will be possible to modify evdev input events / input device behavior to deal with quirky/broken input devices and better workaround other problems that aren’t currently easily addressable.

After deciding between Rust-based WASM or Lua, libinput developers decided to go with a Lua plug-in system since it’s very easy to sandbox the scripts for ensuring secure input handling. The Lua-based plugin system can modify events between the kernel and where the input is then seen by the libinput library.

Red Hat’s leading Linux input expert Peter Hutter explained in a blog post more about the motivation and need for this plugin system:

“The motivation for this are a few unfixable issues – issues we knew how to fix but we cannot actually implement and/or ship the fixes without breaking other devices. One example for this is the inverted Logitech MX Master 3S horizontal wheel. libinput ships quirks for the USB/Bluetooth connection but not for the Bolt receiver. Unlike the Unifying Receiver the Bolt receiver doesn’t give the kernel sufficient information to know which device is currently connected. Which means our quirks could only apply to the Bolt receiver (and thus any mouse connected to it) – that’s a rather bad idea though, we’d break every other mouse using the same receiver. Another example is an issue with worn out mouse buttons – on that device the behavior was predictable enough but any heuristics would catch a lot of legitimate buttons. That’s fine when you know your mouse is slightly broken and at least it works again. But it’s not something we can ship as a general solution. There are plenty more examples like that – custom pointer deceleration, different disable-while-typing, etc.

libinput has quirks but they are internal API and subject to change without notice at any time. They’re very definitely not for configuring a device and the local quirk file libinput parses is merely to bridge over the time until libinput ships the (hopefully upstreamed) quirk.

So the obvious solution is: let the users fix it themselves. And this is where the plugins come in. They are not full access into libinput, they are closer to a udev-hid-bpf in userspace. Logically they sit between the kernel event devices and libinput: input events are read from the kernel device, passed to the plugins, then passed to libinput. A plugin can look at and modify devices (add/remove buttons for example) and look at and modify the event stream as it comes from the kernel device.”

The pending libinput merge request for introducing the plug-in system includes a Lua script example for swapping the left and right mouse buttons:

libinput Lua example

The current thinking is that the new plug-in system should be merged for the upcoming libinput 1.29 release.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article The best Memorial Day deals you can already get
Next Article Our tech experts reveal the best budget mobiles to buy that save you HUNDREDS
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

Israeli couple shot dead in Washington DC by gunman chanting ‘Free Palestine’
News
iPhone 7 Plus and iPhone 8 Now Considered Vintage
News
‘Bucket of Death’ was stuffed with dead VIP in bombshell Sutton Hoo find
News
Top Samsung Promo Codes and Coupons for May 2025
Gadget

You Might also Like

Computing

The Census Didn’t Just Get Safer—It Got More Complex | HackerNoon

5 Min Read
Computing

Amortized BGPLVM: Improved Dimensionality Reduction for scRNA-seq | HackerNoon

8 Min Read
Computing

Balancing Transaction Speed and Fees in Decentralized Apps | HackerNoon

12 Min Read
Computing

How Chillonic’s “Chill-404” Protocol Could Transform NFTs and Memecoins | HackerNoon

5 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?