sparse_keyma...from_keycode(9)
β¨ sparse_keyma...from_keycode(9) β¨
okay so this is a page from the Kernel API Manual, and bestie, it's a short one but it's lowkey iconic. it's all about looking up a keycode in a sparse keymap. let's get into it π«Ά
πΈ NAME πΈ
sparse_keymap_entry_from_keycode β the function that does the sparse keymap lookup for you, no cap π
π SYNOPSIS π
struct key_entry * sparse_keymap_entry_from_keycode (struct input_dev
*dev , unsigned int keycode );
like, it hands you back a struct key_entry * and it takes a struct input_dev *dev plus an unsigned int keycode. that's the whole vibe β¨
π¦ ARGUMENTS π¦
devβ the input device that's using the sparse keymap π this is your main character here.keycodeβ the key code. that's it. that's the whole thing πΉ
π DESCRIPTION π
so what does it actually do? this function performs a struct key_entry lookup inside an input device that's using a sparse keymap. literally that's the job β you give it the device and the keycode, it goes and finds the matching entry. it's giving "designated looker-upper" and honestly? ate π
β¨
π₯ SEE ALSO π₯
- kernel file
./drivers/input/sparse-keymap.cβ go read the source, bestie, it's right there π sparse_keymap_entry_from_scancode(9)sparse_keymap_setup(9)sparse_keymap_report_entry(9)sparse_keymap_report_event(9)
like the whole sparse keymap friend group, all linked up ππ
ngl this one's short and sweet β no scary warnings, no weird edge cases, just a lookup function doing its little thing π
and that's the page!! π brought to you from ./drivers/input, dated October 2026 β mwah, go forth and look up those keycodes, bestie π§π
π¦ 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