xref: /freebsd/usr.sbin/kbdcontrol/kbdcontrol.1 (revision f167d7fb3e81bd884d7b76b78f1216c5afc5db3d)
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
69(250, 500, 750, 1000)
70and
71.Ar repeat
72(34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126,
73136, 152, 168, 184, 200, 220, 236, 252, 272, 304, 336, 368, 400, 440,
74472, 504)
75rates, or if a
76.Ar speed
77argument is specified, it may be one of
78.Cm slow
79(1000.504),
80.Cm fast
81(250.34)
82or
83.Cm normal
84(500.126).
85.It Fl l Ar keymap_file
86Install keyboard map file from
87.Ar keymap_file .
88You may load the keyboard map file from a menu-driven command,
89.Xr kbdmap 1 .
90.It Fl d
91Dump the current keyboard map onto stdout.
92The output may be redirected to a file and can be loaded
93back to the kernel later by the
94.Fl l
95option above.
96.It Fl f Ar # Ar string
97Set function key number
98.Ar #
99to send
100.Ar string .
101Refer to the man page for the keyboard driver
102.Pq e.g. Xr atkbd 4
103for available function keys and their numbers.
104.It Fl F
105Set function keys back to the standard definitions.
106.It Fl x
107Use hexadecimal numbers in keyboard map dump.
108.It Fl h Ar size
109Set history buffer size to
110.Ar size
111lines.
112.It Fl i
113Print brief information about the keyboard.
114.It Fl K
115Disconnect the keyboard from the console.
116You need to use the
117.Fl k
118option below to associate a keyboard with the console again.
119.It Fl k Ar keyboard_device
120Use the specified device as the console keyboard.
121.It Fl L Ar keymap_file
122Load keyboard map file from
123.Ar keymap_file
124and write the
125.Ft "struct keymap"
126compiled from it to stdout.
127This option is primarily intended for programmers and is probably
128of little use under normal circumstances.
129.El
130.Sh KEYBOARD CONFIGURATION
131.Ss Boot Time Configuration
132You may set variables in
133.Pa /etc/rc.conf
134or
135.Pa /etc/rc.conf.local
136in order to configure the keyboard at boot time.
137The following is the list of relevant variables.
138.Pp
139.Bl -tag -width foo_bar_var -compact
140.It Ar keymap
141Specifies a keyboard map file for the
142.Fl l
143option.
144.It Ar keyrate
145Sets the keyboard repeat rate for the
146.Fl r
147option.
148.It Ar keychange
149Lists function key strings for the
150.Fl f
151option.
152.El
153.Pp
154See
155.Xr rc.conf 5
156for details.
157.Ss Driver Configuration
158The keyboard device driver may let you change default configuration
159options, such as the default keyboard map, so that you do not need to set up
160the options at boot time.
161See keyboard driver manuals
162.Pq e.g. Xr atkbd 4 , Xr ukbd 4
163for details.
164.Sh FILES
165.Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact
166.It Pa /usr/share/syscons/keymaps/*
167keyboard map files.
168.Sh EXAMPLE
169The following command will load the keyboard map file
170.Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd .
171.Pp
172.Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
173.Pp
174So long as the keyboard map file resides in
175.Pa /usr/share/syscons/keymaps ,
176you may abbreviate the file name as
177.Pa ru.koi8-r .
178.Pp
179.Dl kbdcontrol -l ru.koi8-r
180.Pp
181The following command will make the function key 10 emit "telnet myhost".
182.Pp
183.Dl kbdcontrol -f 10 \&"telnet myhost\&"
184.Pp
185In order to get the visual effect for bell, but prevent the screen
186from flushing if the bell is to ring in the background screen,
187run the following command.
188.Pp
189.Dl kbdcontrol -b quiet.visual
190.Pp
191.Sh BUGS
192Report when found.
193.Sh SEE ALSO
194.Xr kbdmap 1 ,
195.Xr vidcontrol 1 ,
196.Xr atkbd 4 ,
197.Xr keyboard 4 ,
198.Xr screen 4 ,
199.Xr syscons 4 ,
200.Xr ukbd 4 ,
201.Xr rc.conf 5 .
202.Sh AUTHORS
203.An S�ren Schmidt Aq sos@FreeBSD.org
204