EVIOCSMASK(9)
β¨ EVIOCSMASK β¨
okay so real talk, this is the EVIOCSMASK page from the Kernel API Manual, and it's lowkey one of those little ioctls that eats π
πΈ NAME πΈ
EVIOCSMASK β Set event mask π
π¦ SYNOPSIS π¦
EVIOCSMASK
that's it bestie, that's the whole vibe β¨
π DESCRIPTION π
okay so EVIOCSMASK is literally the counterpart to EVIOCGMASK β like, they're giving sibling energy fr fr π― Instead of receiving the current event mask, this one changes the client's event mask for a specific type. and if you wanna know what an event-mask even is, or what the argument-type looks like, go read EVIOCGMASK's description, she explains all of it π«Ά
this ioctl provides full forward compatibility, which is iconic of it actually π here's the tea:
- if the event type you passed is unknown to the kernel, or if the number of event codes specified in the mask is bigger than what the kernel knows about, the ioctl is still accepted and applied. no drama, no rejection, she just goes with it β¨
- however, any unknown codes are left untouched and stay cleared π§Ή which means the kernel always filters unknown codes regardless of what the client requests. periodt, no cap, that's just how it is π
- and if the new mask doesn't cover all known event-codes, all the remaining codes are automatically cleared and thus filtered. bye bye π
π when it fails
okay so sometimes things don't slay, and this ioctl may fail in these ways:
ENODEVβ in case the file is revoked πEFAULTβ returned if the receive-buffer points to invalid memory πEINVALβ returned if the kernel does not implement the ioctl π
π SEE ALSO π
go check these out, they're all besties of this page:
- Kernel file
./include/uapi/linux/input.h struct input_absinfo(9)struct input_keymap_entry(9)EVIOCGMTSLOTS(9)EVIOCGMASK(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)
and that's the whole page bestie π this lil legend lives at ./include/uapi/linux, dated October 2026, and yeah, it's EVIOCSMASK(9) β mwah, stan her, bye ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms