xref: /freebsd/usr.sbin/kbdcontrol/kbdcontrol.1 (revision 4cf49a43559ed9fdad601bdcccd2c55963008675)
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 June 30, 1999
17.Dt KBDCONTROL 1
18.Os FreeBSD
19.Sh NAME
20.Nm kbdcontrol
21.Nd a utility for manipulating the syscons console driver
22.Sh SYNOPSIS
23.Nm
24.Op Fl dFKix
25.Op Fl b Ar duration.pitch | Ar belltype
26.Op Fl r Ar delay.repeat | Ar speed
27.Op Fl l Ar keymap_file
28.Op Fl f Ar # Ar string
29.Op Fl h Ar size
30.Op Fl k Ar keyboard_device
31.Op Fl L Ar keymap_file
32.Sh DESCRIPTION
33The
34.Nm
35command is used to set various keyboard related options for the
36.Xr syscons 4
37console driver and the keyboard drivers,
38such as key map, keyboard repeat and delay rates, bell
39characteristics etc.
40.Pp
41Keyboard options may be automatically configured at system boot time by
42setting variables in
43.Pa /etc/rc.conf .
44See
45.Sx Boot Time Configuration
46below.
47.Pp
48The following command line options are supported:
49.Bl -tag -width indent
50.It Fl b Ar duration.pitch | Ar belltype
51Set the bell duration in milliseconds and pitch in hertz.
52If a
53.Ar belltype
54argument is specified, it may be one of
55.Cm normal
56which sets sound parameters back to normal values,
57.Cm off
58which disables the bell entirely, or
59.Cm visual
60which sets the bell to visual mode, i.e. flashes the screen instead.
61If
62.Ar belltype
63is preceded by the word
64.Cm quiet. ,
65the bell will not be rung when the ringing process is in the background vty.
66.It Fl r Ar delay.repeat | Ar speed
67Set keyboard
68.Ar delay (250, 500, 750, 1000)
69and
70.Ar repeat (34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126,
71136, 152, 168, 184, 200, 220, 236, 252, 272, 304, 336, 368, 400, 440,
72472, 504)
73rates, or if a
74.Ar speed
75argument is specified, it may be one of
76.Cm slow
77(1000.504),
78.Cm fast
79(250.34)
80or
81.Cm normal
82(500.126).
83.It Fl l Ar keymap_file
84Install keyboard map file from
85.Ar keymap_file .
86You may load the keyboard map file from a menu-driven command,
87.Xr kbdmap 1 .
88.It Fl d
89Dump the current keyboard map onto stdout.
90The output may be redirected to a file and can be loaded
91back to the kernel later by the
92.Fl l
93option above.
94.It Fl f Ar # Ar string
95.\".BI "\-f\ " #\ string
96Set function key number
97.Ar #
98to send
99.Ar string .
100Refer to the man page for the keyboard driver
101.Pq e.g. Xr atkbd 4
102for available function keys and their numbers.
103.It Fl F
104Set function keys back to the standard definitions.
105.It Fl x
106Use hexadecimal numbers in keyboard map dump.
107.It Fl h Ar size
108Set history buffer size to
109.Ar size
110lines.
111.It Fl i
112Print brief information about the keyboard.
113.It Fl K
114Disconnect the keyboard from the console.
115You need to use the
116.Fl k
117option below to associate a keyboard with the console again.
118.It Fl k Ar keyboard_device
119Use the specified device as the console keyboard.
120.It Fl L Ar keymap_file
121Load keyboard map file from
122.Ar keymap_file
123and write the
124.Ft "struct keymap"
125compiled from it to stdout.
126This option is primarily intended for programmers and is probably
127of little use under normal circumstances.
128.El
129.Sh KEYBOARD CONFIGURATION
130.Ss Boot Time Configuration
131You may set variables in
132.Pa /etc/rc.conf
133or
134.Pa /etc/rc.conf.local
135in order to configure the keyboard at boot time.
136The following is the list of relevant variables.
137.Pp
138.Bl -tag -width foo_bar_var -compact
139.It Ar keymap
140Specifies a keyboard map file for the
141.Fl l
142option.
143.It Ar keyrate
144Sets the keyboard repeat rate for the
145.Fl r
146option.
147.It Ar keychange
148Lists function key strings for the
149.Fl f
150option.
151.El
152.Pp
153See
154.Xr rc.conf 5
155for details.
156.Ss Driver Configuration
157The keyboard device driver may let you change default configuration
158options, such as the default keyboard map, so that you do not need to set up
159the options at boot time.
160See keyboard driver manuals
161.Pq e.g. Xr atkbd 4 , Xr ukbd 4
162for details.
163.Sh FILES
164.Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact
165.It Pa /usr/share/syscons/keymaps/*
166keyboard map files.
167.Sh EXAMPLE
168The following command will load the keyboard map file
169.Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd .
170.Pp
171.Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
172.Pp
173So long as the keyboard map file resides in
174.Pa /usr/share/syscons/keymaps ,
175you may abbreviate the file name as
176.Pa ru.koi8-r .
177.Pp
178.Dl kbdcontrol -l ru.koi8-r
179.Pp
180The following command will make the function key 10 emit "telnet myhost".
181.Pp
182.Dl kbdcontrol -f 10 \&"telnet myhost\&"
183.Pp
184In order to get the visual effect for bell, but prevent the screen
185from flushing if the bell is to ring in the background screen,
186run the following command.
187.Pp
188.Dl kbdcontrol -b quiet.visual
189.Pp
190.Sh BUGS
191Report when found.
192.Sh SEE ALSO
193.Xr kbdmap 1 ,
194.Xr vidcontrol 1 ,
195.Xr atkbd 4 ,
196.Xr keyboard 4 ,
197.Xr screen 4 ,
198.Xr syscons 4 ,
199.Xr ukbd 4 ,
200.Xr rc.conf 5 .
201.Sh AUTHORS
202.An S�ren Schmidt Aq sos@FreeBSD.org
203