xref: /freebsd/share/man/man4/atkbd.4 (revision 41059135ce931c0f1014a999ffabc6bc470ce856)
1.\"
2.\" Copyright (c) 1999
3.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer as
11.\"    the first lines of this file unmodified.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
28.\"
29.Dd January 29, 2008
30.Dt ATKBD 4
31.Os
32.Sh NAME
33.Nm atkbd
34.Nd the AT keyboard interface
35.Sh SYNOPSIS
36.Cd "options ATKBD_DFLT_KEYMAP"
37.Cd "makeoptions ATKBD_DFLT_KEYMAP=_keymap_name_"
38.Cd "options KBD_DISABLE_KEYMAP_LOAD"
39.Cd "device atkbd"
40.Pp
41In
42.Pa /boot/device.hints :
43.Cd hint.atkbd.0.at="atkbdc"
44.Cd hint.atkbd.0.irq="1"
45.Sh DESCRIPTION
46The
47.Nm
48driver, together with the
49.Nm atkbdc
50driver, provides access to the AT 84 keyboard or the AT enhanced keyboard
51which is connected to the AT keyboard controller.
52.Pp
53This driver is required for the console driver
54.Xr syscons 4
55or
56.Xr vt 4 .
57.Pp
58There can be only one
59.Nm
60device defined in the kernel configuration file.
61This device also requires the
62.Nm atkbdc
63keyboard controller to be present.
64The
65.Em irq
66number must always be 1; there is no provision of changing the number.
67.Ss Function Keys
68The AT keyboard has a number of function keys.
69They are numbered as follows and can be associated with strings
70by the
71.Xr kbdcontrol 1
72command.
73You can use a keyboard map file (see
74.Xr kbdmap 5 )
75to map them to arbitrary keys, particularly
76the functions in the range from 65 to 96
77which are not used by default.
78.Pp
79.Bl -tag -width "Function Key Number" -compact
80.It "Function Key number"
81Function Key
82.It "1, 2,...12"
83F1, F2,...\& F12
84.It "13, 14,...24"
85Shift+F1, Shift+F2,...\& Shift+F12
86.It "25, 26,...36"
87Ctl+F1, Ctl+F2,...\& Ctl+F12
88.It "37, 38,...48"
89Shift+Ctl+F1, Shift+Ctl+F2,...\& Shift+Ctl+F12
90.It 49
91Home and Numpad 7 (without NumLock)
92.It 50
93Up Arrow and Numpad 8 (without NumLock)
94.It 51
95Page Up and Numpad 9 (without NumLock)
96.It 52
97Numpad -
98.It 53
99Left Arrow and Numpad 4 (without NumLock)
100.It 54
101Numpad 5 (without NumLock)
102.It 55
103Right Arrow and Numpad 6 (without NumLock)
104.It 56
105Numpad +
106.It 57
107End and Numpad 1 (without NumLock)
108.It 58
109Down Arrow and Numpad 2 (without NumLock)
110.It 59
111Page Down and Numpad 3 (without NumLock)
112.It 60
113Ins and Numpad 0 (without NumLock)
114.It 61
115Del
116.It 62
117Left GUI Key
118.It 63
119Right GUI Key
120.It 64
121Menu
122.It "65, 66,...96"
123free (not used by default)
124.El
125.Pp
126See the man page for the
127.Xr kbdcontrol 1
128command for how to assign a string to the function key.
129.Sh DRIVER CONFIGURATION
130.Ss Kernel Configuration Options
131The following kernel configuration options control the
132.Nm
133driver.
134.Bl -tag -width ATKBD_DFLT
135.It Em ATKBD_DFLT_KEYMAP
136This option sets the default, built-in keymap of the
137.Nm
138driver to the named keymap.
139See
140.Sx EXAMPLES
141below.
142.It Em KBD_DISABLE_KEYMAP_LOAD
143The keymap can be modified by the
144.Xr kbdcontrol 1
145command.
146This option will disable this feature and prevent the user from
147changing key assignment.
148.El
149.Ss Driver Flags
150The
151.Nm
152driver accepts the following driver flags.
153They can be set either in
154.Pa /boot/device.hints ,
155or else from within the boot loader
156(see
157.Xr loader 8 ) .
158.Bl -tag -width FAIL
159.It bit 0 (FAIL_IF_NO_KBD)
160By default the
161.Nm
162driver will install even if a keyboard is not actually connected to the
163system.
164This option prevents the driver from being installed in this situation.
165.It bit 1 (NO_RESET)
166When this option is given, the
167.Nm
168driver will not reset the keyboard when initializing it.
169It may be useful for laptop computers whose function keys
170have special functions and these functions are forgotten when the
171keyboard is reset.
172.It bit 2 (ALT_SCANCODESET)
173Certain keyboards, such as those on some ThinkPad models, behave
174like the old XT keyboard and require this option.
175.It bit 3 (NO_PROBE_TEST)
176When this option is given, the
177.Nm
178driver will not test the keyboard port during the probe routine.
179Some machines hang during boot when this test is performed.
180.El
181.\".Sh FILES
182.Sh EXAMPLES
183The
184.Nm
185driver requires the keyboard controller
186.Nm atkbdc .
187Thus, the kernel configuration file should contain the following lines.
188.Pp
189.Dl "device atkbdc"
190.Dl "device atkbd"
191.Pp
192The following example shows how to set the default, built-in keymap
193to
194.Pa jp.106.kbd .
195.Pp
196.Dl "device atkbdc"
197.Dl "options ATKBD_DFLT_KEYMAP"
198.Dl "makeoptions ATKBD_DFLT_KEYMAP=jp.106"
199.Dl "device atkbd"
200.Pp
201In both cases, you also need to have following lines in
202.Pa /boot/device.hints .
203.Pp
204.Dl hint.atkbdc.0.at="isa"
205.Dl hint.atkbdc.0.port="0x060"
206.Dl hint.atkbd.0.at="atkbdc"
207.Dl hint.atkbd.0.irq="1"
208.\".Sh DIAGNOSTICS
209.\".Sh CAVEATS
210.\".Sh BUGS
211.Sh SEE ALSO
212.Xr kbdcontrol 1 ,
213.Xr atkbdc 4 ,
214.Xr psm 4 ,
215.Xr syscons 4 ,
216.Xr vt 4 ,
217.Xr kbdmap 5 ,
218.Xr loader 8
219.Sh HISTORY
220The
221.Nm
222driver first appeared in
223.Fx 3.1 .
224.Sh AUTHORS
225.An -nosplit
226The
227.Nm
228driver was written by
229.An S\(/oren Schmidt Aq Mt sos@FreeBSD.org
230and
231.An Kazutaka Yokota Aq Mt yokota@FreeBSD.org .
232This manual page was written by
233.An Kazutaka Yokota .
234