ir_setkeytable(9)
β¨ ir_setkeytable(9) β¨
okay so bestie, welcome to the ir_setkeytable page β it lives in the Kernel API Manual and honestly it's a whole vibe. it's part of the kernel's remote-control (rc) fam and it's way less scary than the name makes it sound. let's get into it π«Ά
πΈ NAME πΈ
ir_setkeytable β sets several entries in the scancode->keycode table π
like, yes, plural. several. it's the batch girlie of table-setting. β¨
π SYNOPSIS π
int ir_setkeytable (struct rc_dev *dev , const struct rc_map *from );
that's it. two args, one int coming back at you. slay. π
π¦ ARGUMENTS π¦
devβ thestruct rc_devdevice descriptor. the main character, basically πfromβ thestruct rc_mapyou're copying entries from. it's giving "source of truth" energy π
π DESCRIPTION π
no cap, this routine is used to handle table initialization. that's the whole job description and she executes it flawlessly. π§
when you need to fill up the scancode->keycode table, ir_setkeytable is the one you call. periodt.
β RETURN β
-ENOMEMβ returned if all keycodes could not be inserted π like, it ran out of memory mid-way and didn't get everyone in. tragic.- otherwise
zeroβ everything made it in. iconic. π₯
real talk: -ENOMEM literally means not all of them landed, so don't go assuming a partial failure is a full success. she told you. π
π SEE ALSO π
kernel file ./drivers/media/rc/rc-main.c, plus this entire friend group right here β pull up a chair:
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_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)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)
iykyk π¦
and that's the whole page bestie!! this one's straight outta ./drivers/media/rc, dated October 2026 β so yes, it's recent, it's current, it ate and left no crumbs. go forth and initialize those tables π
β¨ππ
π¦ 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