KBD_MODE(1)
๐ KBD_MODE โจ
okay bestie, so this one is literally about your keyboard's whole personality โ whether it's yelling in raw bytes, speaking scancodes, or being a cute little UTF-8 girlie. it lives in the General Commands Manual section, and it's here to report or set the keyboard mode. that's the whole vibe. ๐
๐ธ SYNOPSIS ๐ธ
kbd_mode [ -a | -u | -k | -s | -d ] [ -f ] [ -C CONSOLE ]
like, give it no args and it just tells you what's up. give it args and it starts changing things. ๐
๐ฆ DESCRIPTION ๐ฆ
so here's the tea: if you run kbd_mode with no argument at all, it just prints the current keyboard mode, which is gonna be one of RAW, MEDIUMRAW or XLATE. no drama, just facts. โจ
but the second you start throwing options at it, you can switch the keyboard mode of the current console, or of a console you specifically point at. that's it, that's the whole job. ๐
๐ OPTIONS ๐
-a,--asciiโ sets ASCII mode, akaXLATE. the classic. the icon.-k,--keycodeโ sets keycode mode, akaMEDIUMRAW.-s,--scancodeโ sets scancode mode, akaRAW.-u,--unicodeโ sets UTF-8 mode, akaUNICODE. unicode girlies rise ๐ซถ-d,--disableโ sets Disable mode, akaOFF.-f,--forceโ switches the mode even if it makes the keyboard unusable. yeah. bestie. this one is the "i know what i'm doing (i do not)" flag. ๐-C,--console=DEVโ the console device to be used. like, which console, queen?
so real talk about the modes: the "-a" is only traditional, and honestly the code used can be any 8-bit character set. with "-u" a 16-bit character set is expected, and those chars get transmitted to the kernel as 1, 2, or 3 bytes (following the UTF-8 coding). in these latter two modes โ "-a" and "-u", iykyk โ the key mapping defined by loadkeys(1) is used. ๐
the Didable mode for the virtual console keyboard OFF to compliment RAW in which all key events are ignored. the mode prevents vt input buffers from overflowing when a program opens but doesn't read from a tty, like Xorg using only evdev for input. no cap, that's the whole point of it. ๐
kbd_mode operates on the console specified by the "-C" option; if there is none, the console associated with stdin is used. simple as that. ๐
โ ๏ธ Warning, and I mean it fr fr: changing the keyboard mode, other than between ASCII and Unicode, will probably make your keyboard unusable. set the "-f" option to force such changes. this command is only meant for use (say via remote login) when some program left your keyboard in the wrong state. so like โ don't just yolo it at your local tty, bestie, that's giving "i bricked my input device for fun." ๐ญ
๐ also a lil history note: in some obsolete versions of this program the"-u"option was a synonym for"-s", and older versions of this program may not recognize the"-f"option. so if things are acting weird, it might just be an ancient build being ancient. iconic but problematic. ๐
๐ AUTHORS ๐
- Andries Brouwer
<aeb@cwi.nl>โ the original main character. ๐
โญ SEE ALSO โญ
and that's the whole page, bestie!! this manual came to you from the kbd package, dated 6 Apr 1994, and it's page KBD_MODE(1) of the manual. go forth, check your keyboard mode, and please do not raw-dog the -f flag. ๐โจ๐ฆ
๐ฆ where this page comes from
- alpine 3.23: kbd-doc 2.8.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: kbd-doc 2.8.0-r0 ยท GPL-2.0-or-later
- arch rolling: kbd 2.10.0-1 ยท GPL-2.0-or-later
- fedora 43: kbd 2.8.0-3.fc43 ยท GPL-2.0-or-later
- fedora 43: kbd 2.8.0-4.fc43 ยท GPL-2.0-or-later
- fedora 44: kbd 2.9.0-3.fc44 ยท GPL-2.0-or-later
- fedora 44: kbd 2.9.0-4.fc44 ยท GPL-2.0-or-later
- nixos 26.05: kbd 2.9.0
- nixos 26.05: kbd-vlock 2.9.0
- nixpkgs unstable: kbd 2.9.0
- nixpkgs unstable: kbd-vlock 2.9.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms