rc_g_keycode_from_table(9)
π rc_g_keycode_from_table(9) π
okay bestie, welcome to the Kernel API Manual tea session β today's main character is rc_g_keycode_from_table, and yes she's exactly what her name says she is π
β¨ NAME β¨
rc_g_keycode_from_table β gets the keycode that corresponds to a scancode πΈ
like, that's literally the whole job. scancode goes in, keycode comes out. iconic behavior honestly.
π¦ SYNOPSIS π¦
u32 rc_g_keycode_from_table (struct rc_dev *dev , u64 scancode );
copy it exactly like that, no cap π₯
π ARGUMENTS π
devβ thestruct rc_devdescriptor of the device π«Ά that's your device's little ID card basicallyscancodeβ the scancode to look for π the thing you're hunting through the table for
π DESCRIPTION π
so here's the vibe: this routine is used by drivers which need to convert a scancode to a keycode. that's it, that's the function π
but bestie, listen β normally it should not be used, because drivers should have no interest in keycodes. like, that's not their lane. stay in your lane, driver. π
β RETURN β
the corresponding keycode, or KEY_RESERVED π
so if the search slays you get your keycode, and if it doesn't you get KEY_RESERVED. the end. periodt. π
π SEE ALSO π
kernel file ./drivers/media/rc/rc-main.c π and the whole friend group:
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), ir_do_keyup(9), rc_keyup(9), ir_timer_keyup(9), ir_timer_repeat(9), rc_repeat(9), ir_do_keydown(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)
squad's all here, no one left behind π«Άβ¨
and that's a wrap!! this little page lives in ./drivers/media/rc, dated October 2026, brought to you by the Kernel API Manual β mwah, love u, go read rc-main.c ππ§πΈ
π¦ 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