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.Pq e.g. Xr atkbd 4 112for available function keys and their numbers. 113.It Fl F 114Set function keys back to the standard definitions. 115.It Fl x 116Use hexadecimal numbers in keyboard map dump. 117.It Fl i 118Print brief information about the keyboard. 119.It Fl K 120Disconnect the keyboard from the console. 121You need to use the 122.Fl k 123option below to associate a keyboard with the console again. 124.It Fl k Ar keyboard_device 125Use the specified device as the console keyboard. 126When using this option, the standard input of the 127.Nm 128process should be redirected from 129.Pa /dev/console 130if you are not working on the system console 131(see the 132.Sx EXAMPLES 133section). 134.It Fl L Ar keymap_file 135Load keyboard map file from 136.Ar keymap_file 137and write the 138.Ft "struct keymap" 139compiled from it to stdout. 140This option is primarily intended for programmers and is probably 141of little use under normal circumstances. 142.El 143.Sh ENVIRONMENT 144The environment variable 145.Ev KEYMAP_PATH 146can hold an alternative path to the keyboard map files. 147.Sh KEYBOARD CONFIGURATION 148.Ss Boot Time Configuration 149You may set variables in 150.Pa /etc/rc.conf 151or 152.Pa /etc/rc.conf.local 153in order to configure the keyboard at boot time. 154The following is the list of relevant variables. 155.Pp 156.Bl -tag -width foo_bar_var -compact 157.It Ar keymap 158Specifies a keyboard map file for the 159.Fl l 160option. 161.It Ar keyrate 162Sets the keyboard repeat rate for the 163.Fl r 164option. 165.It Ar keychange 166Lists function key strings for the 167.Fl f 168option. 169.El 170.Pp 171See 172.Xr rc.conf 5 173for details. 174.Ss Driver Configuration 175The keyboard device driver may let you change default configuration 176options, such as the default keyboard map, so that you do not need to set up 177the options at boot time. 178See keyboard driver manuals 179.Pq e.g. Xr atkbd 4 , Xr ukbd 4 180for details. 181.Sh FILES 182.Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact 183.It Pa /usr/share/syscons/keymaps/* 184keyboard map files 185.El 186.Sh EXAMPLES 187The following command will load the keyboard map file 188.Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd . 189.Pp 190.Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd 191.Pp 192So long as the keyboard map file resides in 193.Pa /usr/share/syscons/keymaps , 194you may abbreviate the file name as 195.Pa ru.koi8-r . 196.Pp 197.Dl kbdcontrol -l ru.koi8-r 198.Pp 199The following command will make the function key 10 emit "telnet myhost". 200.Pp 201.Dl kbdcontrol -f 10 \&"telnet myhost\&" 202.Pp 203In order to get the visual effect for bell, but prevent the screen 204from flushing if the bell is to ring in the background screen, 205run the following command. 206.Pp 207.Dl kbdcontrol -b quiet.visual 208.Pp 209To change the default console keyboard to the another keyboard, 210for example the first USB keyboard (see 211.Xr ukbd 4 ) , 212use the following commands. 213.Pp 214.Dl kbdcontrol -k /dev/kbd1 < /dev/console 215.Pp 216To switch back to the default keyboard, use this command. 217.Pp 218.Dl kbdcontrol -k /dev/kbd0 219.Pp 220.Sh BUGS 221Report when found. 222.Sh SEE ALSO 223.Xr kbdmap 1 , 224.Xr vidcontrol 1 , 225.Xr atkbd 4 , 226.Xr keyboard 4 , 227.Xr screen 4 , 228.Xr syscons 4 , 229.Xr ukbd 4 , 230.Xr kbdmap 5 , 231.Xr rc.conf 5 232.Sh AUTHORS 233.An S\(/oren Schmidt Aq sos@FreeBSD.org 234