input_inject_event(9)
π input_inject_event(9) π
okay bestie, welcome to the Kernel API Manual entry for input_inject_event β yes the title is literally the function name, we're keeping it real π
β¨ NAME β¨
input_inject_event β send input event from input handler π¦
πΈ SYNOPSIS πΈ
void input_inject_event (struct input_handle *handle , unsigned int type
, unsigned int code , int value );
no cap, that's the whole signature β void, so don't go looking for a return value, it's not coming π
π ARGUMENTS π
handleβ the input handle you're sending the event through, like your little delivery girl πtypeβ type of the event, the category bestie, the vibe check of the eventcodeβ event code, the specific one, iykykvalueβ value of the event, the actual deets π
π DESCRIPTION π
okay so here's the tea β β input_inject_event is similar to input_event, bestie. like, they're sisters, same energy, but there's one iconic difference:
it will ignore the event if the device is "grabbed" and the handle injecting the event is not the one that owns the device. periodt π
so like, if somebody else grabbed the device and you're not them? your event is literally not making it through. not yours. none for you. <em>the audacity, I know</em> π but that's the whole point β the grab owner gets the monopoly, no jumping the queue π§
π₯ SEE ALSO π₯
the whole friend group, fr fr β Kernel file ./drivers/input/input.c plus:
input_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_set_capability(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, bestie π this whole thing lives in ./drivers/input and it's dated October 2026, still input_inject_event(9) to the very end β slay, ate, no crumbs πβ¨π«Ά
π¦ 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