LIBEVDEV-TWEAK-DEVICE(1)

πŸ’– LIBEVDEV-TWEAK-DEVICE(1) πŸ’–

okay bestie, so this is a page straight out of the General Commands Manual β€” it's the glow-up guide for libevdev-tweak-device, and yes, it's as niche and iconic as it sounds πŸŽ€


✨ NAME ✨

libevdev-tweak-device β€” modify an evdev kernel device πŸ’…


🌸 SYNOPSIS 🌸

libevdev-tweak-device --abs ABS_X [--min a] [--max b] [--res c] [--fuzz
d] [--flat e] /dev/input/eventX libevdev-tweak-device --resolution
res[,yres] /dev/input/eventX

libevdev-tweak-device --led LED_NUML --on|--off /dev/input/eventX

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, libevdev-tweak-device changes the properties of the evdev kernel device sitting at /dev/input/eventX. Right now it can do two things: force an LED on or off, or change the properties of an absolute axis (think its minimum/maximum range, or its resolution). And here's the tea β€” the changes are permanent until the device is removed. periodt. πŸ”₯


πŸ‘‘ OPTIONS πŸ‘‘

πŸ’œ Changing absolute axes

  • --abs axis β€” change the given named ABS_ kernel axis, like ABS_X. For the full list, go look at linux/input.h. And get this: each of the options min, max, res, fuzz, flat can be given too. so many choices, we love options 🫢
  • --min v β€” set the absinfo minimum to the value v
  • --max v β€” set the absinfo maximum to the value v
  • --res v β€” set the absinfo resolution to the value v
  • --fuzz v β€” set the absinfo fuzz to the value v
  • --flat v β€” set the absinfo flat to the value v

πŸŽ€ Changing the x/y resolution

  • --resolution res[,yres] β€” changes the resolution of the ABS_X, ABS_MT_POSITION_X, ABS_Y, and ABS_MT_POSITION_Y axis to the resolution you give it. If you only hand over one resolution value, both the x and y axis get set to that same resolution. But if you give two? Then the first resolution value goes to the x axes and the second one goes to the y axes. it's giving coordinated. πŸ’…

⭐ Toggling LEDs

  • --led led β€” change the given LED, like LED_NUML. For the full list, hit up linux/input.h.
  • --on β€” change the LED state to on ✨
  • --off β€” change the LED state to off πŸ’€

🌈 NOTES 🌈

okay this part is important so listen up πŸ™ˆ The kernel does not notify processes about absinfo property changes. So any process that already grabbed the absinfo from the device is just gonna stay on the old information, blissfully unaware, main character energy but make it stale. Which means using this tool is potentially racy β€” use with caution. fr fr, be careful. 😭


and that's the whole page bestie πŸ’– this lil doc is filed under the General Commands Manual and signed off as LIBEVDEV-TWEAK-DEVICE(1) β€” no cap, that's genuinely all the footer gave us, so take the title and the manual name and go slay some kernel devices. πŸ§šβ€β™€οΈπŸ’œ