.: NinjaTrappeur :. is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
.: NinjaTrappeur :. @ninjatrappeur

Dear power users.

Does anyone know how keyboard ev-dev inputs (ie /dev/inputX) are translated to the correct characters using the default kernel keymap (/usr/src/linux/drivers/char/defkeymap.map) in terminal mode (ie. no X11 nor wayland)?

I am confused and cannot find this answer on the internet and I'm too afraid to read any kind of linux kernel code...

(could you please boost if you do not have the answer, thanks!)

· Web · 3 · 1

@ninjatrappeur with keyboard.c there's a mapping from scancodes to the actual key in a hardcoded table.

@ninjatrappeur That's in kdb though, you might want to look into drivers/tty/keyboard.c

@ninjatrappeur Sorry, drivers/tty/vt/keyboard.c I meant...