xref: /openbsd-src/share/man/man4/pckbd.4 (revision bfc185c1fc344eead3f54156b93fe14638b67e0e)
1.\" $OpenBSD: pckbd.4,v 1.42 2021/05/01 16:11:09 visa Exp $
2.\" $NetBSD: pckbd.4,v 1.3 1999/12/21 11:31:07 drochner Exp $
3.\"
4.\" Copyright (c) 1999
5.\" 	Matthias Drochner.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
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 AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd $Mdocdate: May 1 2021 $
29.Dt PCKBD 4
30.Os
31.Sh NAME
32.Nm pckbd
33.Nd PC keyboard driver for wscons
34.Sh SYNOPSIS
35.Cd "pckbd* at pckbc?"
36.Cd "pckbd* at gsckbc?" Pq hppa
37.Cd "wskbd* at pckbd?"
38.Cd "option PCKBD_LAYOUT=XXX"
39.Sh DESCRIPTION
40This driver supports PC/AT keyboards within the
41.Xr wscons 4
42console framework.
43It doesn't provide direct device driver entry points but makes its
44functions available via the internal
45.Xr wskbd 4
46interface.
47.Pp
48The
49.Nm
50driver supports a number of different key mappings which
51can be chosen from with the kernel option
52.Dq PCKBD_LAYOUT
53at compile time or with the utility
54.Xr wsconsctl 8
55(variable:
56.Dq keyboard.encoding )
57at runtime.
58Other mappings can be used if the whole keymap is replaced by means of
59.Xr wsconsctl 8 .
60The built-in mappings are at this time:
61.Pp
62.Bl -tag -width Ds -offset indent -compact
63.It KB_BE
64.Pq be
65Belgium French.
66.It KB_BR
67.Pq br
68Brazilian.
69.It KB_CF
70.Pq cf
71Canadian French.
72.It KB_DE
73.Pq de
74German with
75.Dq dead accents .
76.It KB_DK
77.Pq dk
78Danish with
79.Dq dead accents .
80.It KB_ES
81.Pq es
82Spanish.
83.It KB_FR
84.Pq fr
85French.
86.It KB_FR | KB_DVORAK
87.Pq fr.dvorak
88French keyboard with
89.Dq Dvorak-Bepo
90layout.
91.It KB_HU
92.Pq hu
93Hungarian.
94.It KB_IS
95.Pq is
96Icelandic with
97.Dq dead accents .
98.It KB_IT
99.Pq it
100Italian.
101.It KB_JP
102.Pq jp
103Japanese.
104.It KB_LA
105.Pq la
106Latinamerican.
107.It KB_LT
108.Pq \&lt
109Lithuanian in
110.Dq ISO 8859-13 .
111.It KB_LV
112.Pq \&lv
113Latvian
114.It KB_NL
115.Pq \&nl
116Dutch with
117.Dq dead accents .
118.It KB_NO
119.Pq no
120Norwegian with
121.Dq dead accents .
122.It KB_PL
123.Pq pl
124Polish in
125.Dq ISO 8859-2 .
126.It KB_PT
127.Pq pt
128Portuguese.
129.It KB_RU
130.Pq ru
131Russian in
132.Dq KOI8 .
133.It KB_SF
134.Pq sf
135Swiss French with
136.Dq dead accents .
137.It KB_SG
138.Pq sg
139Swiss German with
140.Dq dead accents .
141.It KB_SI
142.Pq si
143Slovenian.
144.It KB_SV
145.Pq sv
146Swedish with
147.Dq dead accents .
148.It KB_TR
149.Pq tr
150Turkish in
151.Dq ISO 8859-9
152with
153.Dq dead accents .
154.It KB_UA
155.Pq ua
156Ukrainian in
157.Dq KOI8 .
158.It KB_UK
159.Pq uk
160British.
161.It KB_US
162.Pq us
163English/US keyboard mapping (default).
164.It KB_US | KB_COLEMAK
165.Pq us.colemak
166English/US keyboard with
167.Dq Colemak
168layout.
169.It KB_US | KB_DECLK
170.Pq us.declk
171English/US mapping for
172DEC LK400-style keyboards with PC keyboard interface (eg LK461).
173.It KB_US | KB_DVORAK
174.Pq us.dvorak
175English/US keyboard with
176.Dq Dvorak
177layout.
178.El
179.Pp
180The KB_DE, KB_DK, KB_IS, KB_NO, KB_SF, KB_SG, KB_SV and KB_TR
181mappings can be used in the KB_NODEAD
182.Pq .nodead
183variant.
184This switches off the
185.Dq dead accents .
186.Pp
187The KB_BE, KB_FR, KB_FR | KB_DVORAK, KB_JP, KB_UK, KB_US,
188KB_US | KB_DVORAK and KB_US | KB_COLEMAK
189mappings can be modified
190to swap the left Control and the Caps Lock keys by the
191KB_SWAPCTRLCAPS variant bit or the
192.Dq .swapctrlcaps
193suffix.
194.Pp
195The KB_METAESC
196.Pq .metaesc
197option can be applied to any layout.
198If set, keys pressed together
199with the ALT modifier are prefixed by an ESC character.
200(Standard behaviour is to add 128 to the ASCII value.)
201.Pp
202Because PC keyboard hardware doesn't contain a beeper, requests for
203.Dq keyboard beeps
204cannot be handled directly.
205On alpha and i386, a helper device attached to the pcppi
206driver allows use of the standard ISA speaker for this purpose.
207.Sh EXAMPLES
208To set a German keyboard layout without
209.Dq dead accents
210and sending an ESC character before the key symbol if the ALT
211key is pressed simultaneously, use
212.Ic wsconsctl keyboard.encoding=de.nodead.metaesc .
213To set it at kernel build time, add
214the following to the kernel configuration file:
215.Bd -literal -offset indent
216option PCKBD_LAYOUT="(KB_DE|KB_NODEAD|KB_METAESC)"
217.Ed
218.Sh SEE ALSO
219.Xr intro 4 ,
220.Xr isa 4 ,
221.Xr pckbc 4 ,
222.Xr wskbd 4 ,
223.Xr wsconsctl 8
224.Sh BUGS
225The list of built-in mappings doesn't follow any logic.
226It grew as people submitted what they needed.
227