EVIOCGMASK(9)
β¨ EVIOCGMASK β¨
okay so real talk, this is page EVIOCGMASK(9) from the Kernel API Manual, and bestie, it's literally about grabbing the current event mask. that's the whole vibe. let's get into it π
πΈ NAME πΈ
EVIOCGMASK β Retrieve current event mask
π SYNOPSIS π
EVIOCGMASK
π¦ DESCRIPTION π¦
so this ioctl lets you (the user) retrieve the current event mask for a specific event type. she's nosy but in a productive way π
the argument must be of type struct input_mask and it specifies three things, periodt:
- the event type to query
- the address of the receive buffer
- the size of the receive buffer
now, what even is the event mask? it's a per-client mask that specifies which events get forwarded to the client. each event code is represented by a single bit in the event mask. if the bit is set, the event is passed to the client normally. otherwise? the event is filtered and will never be queued on the client's receive buffer. not ever. not once. she's blocked π
important tho β event masks do not affect the global state of the input device. they only affect the file descriptor they're applied to. so like, it's a you thing, not a everyone thing π«Ά
the default event mask for a client has all bits set, i.e. all events are forwarded to the client. icon behavior, honestly π
and here's the edge case, pay attention: if the kernel is queried for an unknown event type, or if the receive buffer is larger than the number of event codes known to the kernel, the kernel returns all zeroes for those codes. zeroes. nothing. empty. π
at maximum, codes_size bytes are copied.
β οΈ this ioctl may fail withENODEVin case the file is revoked,EFAULTif the receive-buffer points to invalid memory, orEINVALif the kernel does not implement the ioctl. so like... know the errors, bestie, they will find you π
π SEE ALSO π
- Kernel file
./include/uapi/linux/input.h struct input_absinfo(9)struct input_keymap_entry(9)EVIOCGMTSLOTS(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)
okay that's the whole page!! this one lives under ./include/uapi/linux and it's dated October 2026 β so like, mark your calendars, mwah πβ¨ see u in the next manpage bestie π¦π
π¦ 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