1.\" 2.\" kbdcontrol - a utility for manipulating the syscons keyboard driver section 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" @(#)kbdcontrol.1 14.\" $FreeBSD$ 15.\" 16.Dd May 27, 2001 17.Dt KBDCONTROL 1 18.Os 19.Sh NAME 20.Nm kbdcontrol 21.Nd keyboard control and configuration utility 22.Sh SYNOPSIS 23.Nm 24.Op Fl dFKix 25.Oo 26.Fl b 27.Ar duration . Ns Ar pitch | Ar belltype 28.Oc 29.Oo 30.Fl r 31.Ar delay . Ns Ar repeat | Ar speed 32.Oc 33.Op Fl l Ar keymap_file 34.Op Fl f Ar # Ar string 35.Op Fl k Ar keyboard_device 36.Op Fl L Ar keymap_file 37.Sh DESCRIPTION 38The 39.Nm 40command is used to set various keyboard related options for the 41.Xr syscons 4 42console driver and the keyboard drivers, 43such as key map, keyboard repeat and delay rates, bell 44characteristics etc. 45.Pp 46Keyboard options may be automatically configured at system boot time by 47setting variables in 48.Pa /etc/rc.conf . 49See 50.Sx Boot Time Configuration 51below. 52.Pp 53The following command line options are supported: 54.Bl -tag -width indent 55.It Fl b Xo 56.Ar duration . Ns Ar pitch | Ar belltype 57.Xc 58Set the bell duration in milliseconds and pitch in hertz. 59If a 60.Ar belltype 61argument is specified, it may be one of 62.Cm normal 63which sets sound parameters back to normal values, 64.Cm off 65which disables the bell entirely, or 66.Cm visual 67which sets the bell to visual mode, i.e. flashes the screen instead. 68If 69.Ar belltype 70is preceded by the word 71.Cm quiet. , 72the bell will not be rung when the ringing process is in the background vty. 73.It Fl r Xo 74.Ar delay . Ns Ar repeat | Ar speed 75.Xc 76Set keyboard 77.Ar delay 78(250, 500, 750, 1000) 79and 80.Ar repeat 81(34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126, 82136, 152, 168, 184, 200, 220, 236, 252, 272, 304, 336, 368, 400, 440, 83472, 504) 84rates, or if a 85.Ar speed 86argument is specified, it may be one of 87.Cm slow 88(1000.504), 89.Cm fast 90(250.34) 91or 92.Cm normal 93(500.126). 94.It Fl l Ar keymap_file 95Install keyboard map file from 96.Ar keymap_file . 97You may load the keyboard map file from a menu-driven command, 98.Xr kbdmap 1 . 99.It Fl d 100Dump the current keyboard map onto stdout. 101The output may be redirected to a file and can be loaded 102back to the kernel later by the 103.Fl l 104option above. 105.It Fl f Ar # Ar string 106Set function key number 107.Ar # 108to send 109.Ar string . 110Refer to the man page for the keyboard driver 111(e.g.\& 112.Xr atkbd 4 ) 113for available function keys and their numbers. 114.It Fl F 115Set function keys back to the standard definitions. 116.It Fl x 117Use hexadecimal numbers in keyboard map dump. 118.It Fl i 119Print brief information about the keyboard. 120.It Fl K 121Disconnect the keyboard from the console. 122You need to use the 123.Fl k 124option below to associate a keyboard with the console again. 125.It Fl k Ar keyboard_device 126Use the specified device as the console keyboard. 127When using this option, the standard input of the 128.Nm 129process should be redirected from 130.Pa /dev/console 131if you are not working on the system console 132(see the 133.Sx EXAMPLES 134section). 135.It Fl L Ar keymap_file 136Load keyboard map file from 137.Ar keymap_file 138and write the 139.Ft "struct keymap" 140compiled from it to stdout. 141This option is primarily intended for programmers and is probably 142of little use under normal circumstances. 143.El 144.Sh ENVIRONMENT 145The environment variable 146.Ev KEYMAP_PATH 147can hold an alternative path to the keyboard map files. 148.Sh KEYBOARD CONFIGURATION 149.Ss Boot Time Configuration 150You may set variables in 151.Pa /etc/rc.conf 152or 153.Pa /etc/rc.conf.local 154in order to configure the keyboard at boot time. 155The following is the list of relevant variables. 156.Pp 157.Bl -tag -width foo_bar_var -compact 158.It Ar keymap 159Specifies a keyboard map file for the 160.Fl l 161option. 162.It Ar keyrate 163Sets the keyboard repeat rate for the 164.Fl r 165option. 166.It Ar keychange 167Lists function key strings for the 168.Fl f 169option. 170.El 171.Pp 172See 173.Xr rc.conf 5 174for details. 175.Ss Driver Configuration 176The keyboard device driver may let you change default configuration 177options, such as the default keyboard map, so that you do not need to set up 178the options at boot time. 179See keyboard driver manuals 180(e.g.\& 181.Xr atkbd 4 , 182.Xr ukbd 4 ) 183for details. 184.Sh FILES 185.Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact 186.It Pa /usr/share/syscons/keymaps/* 187keyboard map files 188.El 189.Sh EXAMPLES 190The following command will load the keyboard map file 191.Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd . 192.Pp 193.Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd 194.Pp 195So long as the keyboard map file resides in 196.Pa /usr/share/syscons/keymaps , 197you may abbreviate the file name as 198.Pa ru.koi8-r . 199.Pp 200.Dl kbdcontrol -l ru.koi8-r 201.Pp 202The following command will make the function key 10 emit "telnet myhost". 203.Pp 204.Dl kbdcontrol -f 10 \&"telnet myhost\&" 205.Pp 206In order to get the visual effect for bell, but prevent the screen 207from flushing if the bell is to ring in the background screen, 208run the following command. 209.Pp 210.Dl kbdcontrol -b quiet.visual 211.Pp 212To change the default console keyboard to the another keyboard, 213for example the first USB keyboard (see 214.Xr ukbd 4 ) , 215use the following commands. 216.Pp 217.Dl kbdcontrol -k /dev/kbd1 < /dev/console 218.Pp 219To switch back to the default keyboard, use this command. 220.Pp 221.Dl kbdcontrol -k /dev/kbd0 222.Sh BUGS 223Report when found. 224.Sh SEE ALSO 225.Xr kbdmap 1 , 226.Xr vidcontrol 1 , 227.Xr atkbd 4 , 228.Xr keyboard 4 , 229.Xr screen 4 , 230.Xr syscons 4 , 231.Xr ukbd 4 , 232.Xr kbdmap 5 , 233.Xr rc.conf 5 234.Sh AUTHORS 235.An S\(/oren Schmidt Aq sos@FreeBSD.org 236