ir_update_mapping(9)
π ir_update_mapping(9) β Kernel API Manual energy
okay so real talk, bestie: this is ir_update_mapping, living its best life in the Kernel API Manual (yes, section 9, we love a kernel-internals moment). It's the lil function that swaps out one keycode in the scancodeβkeycode table, and honestly? iconic. π
β¨ NAME β¨
ir_update_mapping β set a keycode in the scancode->keycode table π¦
πΈ SYNOPSIS πΈ
unsigned int ir_update_mapping (struct rc_dev *dev , struct rc_map
*rc_map , unsigned int index , unsigned int new_keycode );
that's the whole vibe, no cap. four args, one unsigned int coming back at you. β¨
π ARGUMENTS π
devβ thestruct rc_devdevice descriptor. it's giving "who dis" but for your remote control device πrc_mapβ the scancode table that's about to get adjusted. yes, that table. be nice to it π«Άindexβ the index of the mapping that needs to be updated. like, which row are we editing bestie πnew_keycodeβ the desired keycode. the glow-up you want to put in there π
π₯ DESCRIPTION π₯
so here's the tea: this routine is used to update the scancode->keycode mapping at a given position. that's it, that's the whole thing. you point at a spot, you hand it a new keycode, it does the swap. main character energy, zero drama. β
β RETURN β
it hands you back the previous keycode assigned to the mapping β i.e. the one that was there before you showed up and changed everything. the before picture, if you will π
π¦ SEE ALSO π¦
okay bestie, buckle up, this is a long list and we're not skipping a single one, periodt. π
- 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_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)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)
like I said. all of them. ate and left no crumbs π
ngl, this one's a snack-sized page β no bugs flagged, no warnings, no deprecated anything to yell about. just pure, well-adjusted table-updating behavior. π
and that's the page, bestie! brought to you from ./drivers/media/rc, dated October 2026, straight out of the Kernel API Manual (section 9, obviously π). go forth and update those mappings, mwah π§π
π¦ 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