input_set_keycode(9)
β¨ input_set_keycode(9) β¨
omg hiii bestie π welcome to the Kernel API Manual β today we're learning about input_set_keycode, and honestly? it's giving "small function, big main character energy" π
πΈ NAME πΈ
input_set_keycode β attribute a keycode to a given scancode β¨
like, you've got a scancode and you're like "bestie, you're a keycode now" and this function is the one who makes it official π
π¦ SYNOPSIS π¦
int input_set_keycode (struct input_dev *dev , const struct
input_keymap_entry *ke );
π ARGUMENTS π
devβ the input device whose keymap is being updated π«Ά like, this is the device you're doing a little glow-up onkeβ the new keymap entry β your fresh new vibe, ready to be installed
π DESCRIPTION π
okay so listen π β this function should be called by anyone who needs to update the current keymap. that's it, that's the rule, no cap.
presently? the keyboard and evdev handlers use it π₯ so you're in good company.
π SEE ALSO π
Kernel file ./drivers/input/input.c
and now, the iconic friend group π (seriously, this list ate):
input_event(9)input_inject_event(9)input_alloc_absinfo(9)input_copy_abs(9)input_grab_device(9)input_release_device(9)input_open_device(9)input_close_device(9)input_scancode_to_scalar(9)input_default_setkeycode(9)input_get_keycode(9)input_reset_device(9)input_allocate_device(9)devm_input_allocate_device(9)input_free_device(9)input_set_timestamp(9)input_get_timestamp(9)input_set_capability(9)input_enable_softrepeat(9)input_register_device(9)input_unregister_device(9)input_register_handler(9)input_unregister_handler(9)input_handler_for_each_handle(9)input_register_handle(9)input_unregister_handle(9)input_get_new_minor(9)input_free_minor(9)
ok that's the whole page, you understood it perfectly, i'm so proud of you ππ go forth and remap some keys, bestie π§
and finally, the cute little sign-off π: this one lives in ./drivers/input, dated October 2026, and it's literally called input_set_keycode(9). slay π
β¨
π¦ 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