KBDCONTROL(1)
β¨ KBDCONTROL(1) β¨ β the keyboard glow-up manual, bestie edition π
okay so picture this: it's kbdcontrol, a General Commands Manual situation, and it's literally the system video console keyboard control/configuration utility πΉπ she's the one who handles all your keyboard vibes on the console β no cap.
πΈ NAME πΈ
kbdcontrol β system video console keyboard control/configuration utility π«Ά
π SYNOPSIS π
kbdcontrol [-dFKix] [-A name] [-a name] [-b duration.pitch | belltype]
[-r delay.repeat | speed] [-l keymap_file] [-f # string]
[-k keyboard_device] [-L keymap_file] [-P path]
π DESCRIPTION π
kbdcontrol is the girl who sets all your keyboard-related options for the syscons(4) or vt(4) console driver and the keyboard drivers β key map, keyboard repeat and delay rates, bell characteristics, the whole cute package β¨
Keyboard options can also be set up automatically at system boot time by setting variables in /etc/rc.conf. Peep βBoot Time Configurationβ down below π
The following command line options are supported, and yes, we're covering every single one π§
-A nameβ detaches the keyboard, the one specified by the keyboard device name, from the keyboard multiplexer. when you use this option, the standard input of thekbdcontrolprocess should be redirected from the keyboard multiplexer keyboard device (if the keyboard multiplexer is not the active keyboard) or/dev/console(if the keyboard multiplexer is the active keyboard and you're not working on the system console). ok? ok π«Ά-a nameβ attaches the keyboard, specified by the keyboard device name, to the keyboard multiplexer. when you use this option, the standard input of thekbdcontrolprocess should be redirected from the keyboard multiplexer keyboard device (if the keyboard multiplexer is not the active keyboard) or/dev/console(if the keyboard multiplexer is the active keyboard and you're not working on the system console). same deal as-Abut the attach direction π-b duration.pitch | belltypeβ sets the bell duration in milliseconds and pitch in hertz. if a belltype argument is specified, it can be one ofnormal, which sets sound parameters back to normal values,off, which disables the bell entirely, orvisual, which sets the bell to visual mode, i.e. flashes the screen instead. if belltype is preceded by the wordquiet., the bell will not be rung when the ringing process is in the background vty. the visual bell, when chosen, applies to all vtys; other bell types can be set individually for each vty. iconique πβ¨-r delay.repeat | speedβ sets keyboard delay (250,500,750,1000) and repeat (34,38,42,46,50,55,59,63,68,76,84,92,100,110,118,126,136,152,168,184,200,220,236,252,272,304,336,368,400,440,472,504) rates. or, if a speed argument is specified, it can be one ofslow(1000.504),fast(250.34) ornormal(500.126). yes those are all the numbers, don't @ me β‘-l keymap_fileβ installs the keyboard map file from keymap_file. you can also load the keyboard map file from a menu-driven command,kbdmap(1). the format of keyboard map files is documented in thekbdmap(5)manual page πΊοΈπ-dβ dumps the current keyboard map onto stdout. the output may be redirected to a file and can be loaded back to the kernel later by the-loption above. round trip slay π-f # stringβ sets function key number # to send string. refer to the man page for the keyboard driver (e.g.atkbd(4)) for available function keys and their numbers π―-Fβ sets function keys back to the standard definitions. factory reset energy, but just for the function keys π-xβ uses hexadecimal numbers in the keyboard map dump π’-iβ prints brief information about the keyboard βΉοΈ-Kβ disconnects the keyboard from the console. you need to use the-koption below to associate a keyboard with the console again. heads up, this one literally unplugs your keyboard's connection to the console, so don't be dramatic about it π-k keyboard_deviceβ uses the specified device as the console keyboard. when using this option, the standard input of thekbdcontrolprocess should be redirected from/dev/consoleif you're not working on the system console (see the βEXAMPLESβ section) πΉ-L keymap_fileβ loads the keyboard map file from keymap_file and writes thestruct keymapcompiled from it to stdout. this option is primarily intended for programmers and is probably of little use under normal circumstances. nerd territory, respectfully π€-P pathβ searches for the keymap file in path. the-Poption may be specified multiple times. stack 'em like little bracelets π
π¦ ENVIRONMENT π¦
the environment variable KEYMAP_PATH can hold an alternative path to the keyboard map files π
π KEYBOARD CONFIGURATION π
β Boot Time Configuration β
you may set variables in /etc/rc.conf or /etc/rc.conf.local in order to configure the keyboard at boot time. here's the list of relevant variables, bestie:
keymapβ specifies a keyboard map file for the-loption πΊοΈkeyrateβ sets the keyboard repeat rate for the-roption β‘keychangeβ lists function key strings for the-foption π―
see rc.conf(5) for details β¨
π Driver Configuration π
the keyboard device driver may let you change default configuration options, such as the default keyboard map, so that you don't need to set up the options at boot time. see keyboard driver manuals (e.g. atkbd(4), ukbd(4)) for details π«Ά
π FILES π
/usr/share/syscons/keymaps/*β keyboard map files for syscons/usr/share/vt/keymaps/*β keyboard map files for vt
π₯ EXAMPLES π₯
the following command will load the keyboard map file /usr/share/syscons/keymaps/ru.koi8-r.kbd:
kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
so long as the keyboard map file resides in /usr/share/syscons/keymaps (if using syscons(4)) or /usr/share/vt/keymaps (if using vt(4)), you may abbreviate the file name as ru.koi8-r. since vt(4) uses Unicode, the corresponding keyboard file names omit the encoding and typically are just a country code, e.g. ru:
kbdcontrol -l ru.koi8-r
the following command will make the function key 10 emit "telnet myhost":
kbdcontrol -f 10 "telnet myhost"
in order to get the visual effect for the bell, but prevent the screen from flashing if the bell is to ring in the background screen, run the following command:
kbdcontrol -b quiet.visual
to change the default console keyboard to another keyboard, for example the first USB keyboard (see ukbd(4)), use the following command:
kbdcontrol -k /dev/ukbd0 < /dev/console
to switch back to the default keyboard, use this command:
kbdcontrol -k /dev/kbd0
to allow using both the second USB keyboard and the first AT keyboard at the same time on console via the kbdmux(4) driver, use the following sequence of commands:
kbdcontrol -K < /dev/console
kbdcontrol -a atkbd0 < /dev/kbdmux0
kbdcontrol -a ukbd1 < /dev/kbdmux0
kbdcontrol -k /dev/kbdmux0 < /dev/console
fr fr copy those exactly, every character matters π
π§ SEE ALSO π§
kbdmap(1), vidcontrol(1), atkbd(4), kbdmux(4), keyboard(4), screen(4), syscons(4), ukbd(4), vt(4), kbdmap(5), rc.conf(5) β the whole friend group π
π AUTHORS π
SΓΈren Schmidt <sos@FreeBSD.org> β icon, legend, the moment π
π BUGS π
report when found. that's it, that's the whole policy π
and that's the page, bestie!! π this lil masterpiece lives in the Debian General Commands Manual, dated July 7, 2024. go forth and configure your keyboard, you gorgeous nerd π¦πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms