ir_setkeycode(9)
πΈ NAME πΈ
okay bestie, welcome to ir_setkeycode(9) β yes, that's the page title, and the manual is the Kernel API Manual. This icon is here to set a keycode in the scancode->keycode table, no cap.
β¨ SYNOPSIS β¨
int ir_setkeycode (struct input_dev *idev , const struct
input_keymap_entry *ke , unsigned int *old_keycode );
π ARGUMENTS π
idevβ thestruct input_devdevice descriptor. It's giving main-character device energy, honestly.keβ Input keymap entry. Your keymap moment, fr fr.old_keycodeβ result. The old keycode result lands here, bestie.
π DESCRIPTION π
This routine is used to handle evdev EVIOCSKEY ioctl. That's the whole vibe: it handles that ioctl, periodt.
π₯ RETURN π₯
-EINVAL if the keycode could not be inserted, otherwise zero. So if the insert says nope, you get -EINVAL; otherwise it's zero. Slay.
π¦ SEE ALSO π¦
Kernel file ./drivers/media/rc/rc-main.c is the hotspot, and here's the whole squad, iykyk:
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_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)
xoxo, signing off from the source/version ./drivers/media/rc, October 2026 π
π¦ 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