input_set_capability(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… input_set_capability β€” kernel API manual, but make it make sense

okay so bestie, welcome to the <pink>input_set_capability(9)</pink> page from the Kernel API Manual β€” yes that's the manual name, we're being official today πŸŽ€. This is the glow-up function that tells the whole input subsystem "hey, this device can do this thing," so buckle up πŸ¦‹


✨ NAME ✨

input_set_capability β€” mark device as capable of a certain event. literally just declaring what your device is able to do, no cap πŸ’…


🌸 SYNOPSIS 🌸

void input_set_capability (struct input_dev *dev , unsigned int type ,
unsigned int code );

that's the whole vibe: three args, void return, in we go ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device that is capable of emitting or accepting event. like, the actual input device in question, the main character πŸ‘‘
  • type β€” type of the event (EV_KEY, EV_REL, etc...). the category of thing we're talking about here πŸ—‚οΈ
  • code β€” event code. the specific one inside that category, iykyk πŸ”₯

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• β€” in addition to setting up corresponding bit in appropriate capability bitmap, the function also adjusts dev->evbit. two things, one call, we love an efficient queen 🫢

like. it does the bitmap thing AND it pokes dev->evbit for you. no need to go do it yourself, bestie, it's handled βœ¨πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/input/input.c β€” and then the whole squad, fr fr, here's every single one πŸ¦‹:


and that's the page!! 🩷 this lil beauty lives in the <purple>./drivers/input</purple> source and it's dated October 2026 β€” so go forth, set those capabilities, and slay πŸ’…βœ¨πŸŒŸ

πŸ“¦ where this page comes from