vt_do_kdskbmode(9)
π vt_do_kdskbmode(9) β from the Kernel API Manual, bestie
okay so picture this: a kernel function that handles the set keyboard mode ioctl, and it's living in the Kernel API Manual chapter. no cap, she's a real one. let's get into it π
β¨ SYNOPSIS β¨
int vt_do_kdskbmode (unsigned int console , unsigned int arg );
literally the whole signature, right there π«Ά two unsigned ints and she returns an int. iconic brevity.
πΈ ARGUMENTS πΈ
consoleβ the console you wanna use, bestie. that's the one. the console in question πargβ the mode you're requesting. like, the whole vibe you want the keyboard mode to be in β¨
π DESCRIPTION π
okay so what she does is update the keyboard mode bits β and the key detail here (pun intended, sorry π) is that she does it while holding the correct locks. no cap, that's the important part. locks are held, bits are updated, everyone goes home happy.
and then: she returns 0 for success, or an error code if things didn't go great. that's it. that's the whole function. main character energy, honestly π
π¦ SEE ALSO π¦
the kernel file in question is:
./drivers/tty/vt/keyboard.c
and here's her whole friend group, fr fr β go say hi:
vt_get_leds(9)vt_set_led_state(9)vt_kbd_con_start(9)vt_kbd_con_stop(9)vt_do_diacrit(9)vt_do_kdskbmeta(9)vt_do_kdgkbmeta(9)vt_reset_unicode(9)vt_get_shift_state(9)vt_reset_keyboard(9)vt_get_kbd_mode_bit(9)vt_set_kbd_mode_bit(9)vt_clr_kbd_mode_bit(9)
π friendly reminder: she only touches the keyboard mode bits while holding the correct locks β don't try to speedrun that part, ngl.
and that's the page!! π this whole thing comes from the ./drivers/tty/vt corner of the world, dated October 2026, and yes the man page name is vt_do_kdskbmode(9) β write it down, bestie, there will be a quiz πβ
π¦ 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