vt_set_kbd_mode_bit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vt_set_kbd_mode_bit β€” Kernel API Manual energy ✨

okay bestie, welcome to the Kernel API Manual page for vt_set_kbd_mode_bit(9) and honestly? it's a short one, so we're gonna get through it together and you're gonna understand it. periodt. 🫢

✨ NAME ✨

vt_set_kbd_mode_bit β€” read keyboard status bits 🌸

(yes that's what it says, and no I'm not gonna lie to you about it β€” that's the name section, word for word, iconic little documentation moment πŸ’€)

πŸ¦‹ SYNOPSIS πŸ¦‹

void vt_set_kbd_mode_bit (unsigned int console , int bit );

look at her. two args, returns nothing, does exactly what it says on the tin. no cap, that's the whole signature πŸ”₯

πŸŽ€ ARGUMENTS πŸŽ€

  • console β€” the console to read from πŸ–₯️ (yes, "read", keep reading, iykyk)
  • bit β€” the mode bit to read ✨

πŸ’œ DESCRIPTION πŸ’œ

so the actual job here is: set a vt mode bit. that's it, that's the gig πŸ‘‘

but here's the part where you gotta pay attention, bestie, because this is the main character caveat: we do this without locking. so the caller must be sure that there are no synchronization needs 😭

🚨 like, genuinely β€” no locking happens here. if you're calling this and something else is touching the same state, that's on you, not on the function. the caller has to be certain there are no synchronization needs. do not come for this function later. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./drivers/tty/vt/keyboard.c β€” go read the source, it's giving homework but make it cute πŸ“šβœ¨

and then the whole friend group of related calls, all of them, no skipping:


that's the whole page, bestie. short, sweet, and lowkey a little mysterious about the read/set situation, but we respect her πŸŽ€

source: ./drivers/tty/vt Β· date: October 2026 β€” mwah, go forth and set those mode bits responsibly, ily πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from