STRUCT INPUT_ABSINFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct input_absinfo(9)

okay so bestie, welcome to the Kernel API Manual ✨ this one's about struct input_absinfo and honestly it's lowkey the blueprint for how the kernel talks about axes. let me put you on 🫢


🌸 NAME 🌸

struct input_absinfo β€” the struct that the EVIOCGABS / EVIOCSABS ioctls use, like literally that's its whole job πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

struct input_absinfo {
    __s32 value;
    __s32 minimum;
    __s32 maximum;
    __s32 fuzz;
    __s32 flat;
    __s32 resolution;
 };

look at her. six __s32 fields, no notes, iconic πŸ‘‘


πŸ¦‹ Members πŸ¦‹

  • value β€” the latest reported value for the axis. the current reading, the moment, the main character ✨
  • minimum β€” specifies the minimum value for the axis. the floor, fr fr.
  • maximum β€” specifies the maximum value for the axis. the ceiling bestie πŸ’―
  • fuzz β€” specifies the fuzz value, which is what's used to filter noise out of the event stream. think of it as the "ignore the jitter" knob πŸŒͺ️
  • flat β€” values that land within this value get discarded by the joydev interface and reported as 0 instead. so yes, tiny movements get rounded down to nothing πŸ™ˆ
  • resolution β€” specifies the resolution for the values reported for the axis. precision info, basically πŸ“

πŸ’œ Description πŸ’œ

heads up bestie: the input core does not clamp reported values to the [minimum, maximum] limits. that task is left to userspace, so if you thought the kernel had your back on this β€” it does not 😭 that's on you βœ‹

so, the resolution tea β˜• the default resolution for the main axes (ABS_X, ABS_Y, ABS_Z, ABS_MT_POSITION_X, ABS_MT_POSITION_Y) is reported in units per millimeter (units/mm), and the resolution for rotational axes (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian. slay, units.

the resolution for the size axes (ABS_MT_TOUCH_MAJOR, ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MAJOR, ABS_MT_WIDTH_MINOR) is reported in units per millimeter (units/mm). same unit, different flavor 🌈

and when INPUT_PROP_ACCELEROMETER is set, the resolution changes β€” plot twist 😳 the main axes (ABS_X, ABS_Y, ABS_Z) are then reported in units per g (units/g), and rotational axes (ABS_RX, ABS_RY, ABS_RZ) are reported in units per degree per second (units/deg/s).

so yeah. same struct, different units depending on whether the accelerometer prop is set. iykyk πŸ’«


⭐ SEE ALSO ⭐

go read these next, bestie, they're all in the kernel file ./include/uapi/linux/input.h:

  • struct input_keymap_entry(9)
  • EVIOCGMTSLOTS(9)
  • EVIOCGMASK(9)
  • EVIOCSMASK(9)
  • struct ff_replay(9)
  • struct ff_trigger(9)
  • struct ff_envelope(9)
  • struct ff_constant_effect(9)
  • struct ff_ramp_effect(9)
  • struct ff_condition_effect(9)
  • struct ff_periodic_effect(9)
  • struct ff_rumble_effect(9)
  • struct ff_haptic_effect(9)
  • struct ff_effect(9)

that's the whole page babes, go forth and respect your limits (or don't, userspace is literally in charge of clamping) πŸ’–

sign-off: this came from ./include/uapi/linux, dated October 2026, and it's struct input_absinfo(9) forever and always πŸŽ€βœ¨

πŸ“¦ where this page comes from