ir_do_keydown(9)
π ir_do_keydown β like, the kernel API manual, bestie
okay so welcome to ir_do_keydown(9), part of the Kernel API Manual β¨ this is the literal backstage pass to how a keypress gets registered, and honestly? it's giving main character energy but behind the curtain. iykyk.
π NAME π
ir_do_keydown β the internal function that processes a keypress π
β¨ SYNOPSIS β¨
void ir_do_keydown (struct rc_dev *dev , enum rc_proto protocol , u64
scancode , u32 keycode , u8 toggle );
like, that's the whole signature. no cap, that's it. π«Ά
πΈ ARGUMENTS πΈ
devβ thestruct rc_devdescriptor of the device. it's the whole vibe of which device we're talking about πprotocolβ the protocol of the keypress. yes, it's anenum rc_proto, slay πscancodeβ the scancode of the keypress. au64, so it's got range πkeycodeβ the keycode of the keypress. this is theu32bestie π¦toggleβ the toggle value of the keypress. tiny lilu8, but it matters, fr fr β
π₯ DESCRIPTION π₯
so basically this function is used internally to register a keypress. nothing external, nothing public, it's an inside-job situation π
β οΈ and here's the important part, bestie β it must be called with keylock held. like, not "should", not "maybe", must. the vibes are non-negotiable. hold the lock or don't come in π
π¦ SEE ALSO π¦
it's giving friend group, and here's the whole squad β all in the kernel file ./drivers/media/rc/rc-main.c:
scancode_to_u64(9)ir_create_table(9)ir_free_table(9)ir_resize_table(9)ir_update_mapping(9)ir_establish_scancode(9)ir_setkeycode(9)ir_setkeytable(9)ir_lookup_by_scancode(9)ir_getkeycode(9)rc_g_keycode_from_table(9)ir_do_keyup(9)rc_keyup(9)ir_timer_keyup(9)ir_timer_repeat(9)rc_repeat(9)rc_keydown(9)rc_keydown_notimeout(9)rc_validate_scancode(9)rc_validate_filter(9)struct rc_filter_attribute(9)show_protocols(9)parse_protocol_change(9)store_protocols(9)show_filter(9)store_filter(9)show_wakeup_protocols(9)store_wakeup_protocols(9)
like, that's the group chat. everyone's invited π«Ά
π okay that's the whole page bestie β much love from ./drivers/media/rc, dated October 2026, and remember: it's ir_do_keydown(9) forever and always. periodt. π
ππ
π¦ 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