input_set_capability(9)
π
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 π¦:
input_event(9)input_inject_event(9)input_alloc_absinfo(9)input_copy_abs(9)input_grab_device(9)input_release_device(9)input_open_device(9)input_close_device(9)input_scancode_to_scalar(9)input_default_setkeycode(9)input_get_keycode(9)input_set_keycode(9)input_reset_device(9)input_allocate_device(9)devm_input_allocate_device(9)input_free_device(9)input_set_timestamp(9)input_get_timestamp(9)input_enable_softrepeat(9)input_register_device(9)input_unregister_device(9)input_register_handler(9)input_unregister_handler(9)input_handler_for_each_handle(9)input_register_handle(9)input_unregister_handle(9)input_get_new_minor(9)input_free_minor(9)
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
- 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