Mon Jul 13 11:14:12 2020 UTC ()
Move description of keyboard layouts to wskbd.4, add newer layouts

Previously, the best reference was pckbd.4. This does not make much
sense to read if you are on, say, an evbarm device with only USB.

wsconsctl.8 contained a vaguer description of supported language names,
which isn't very useful because you can't pass full language names
to the command. Point readers to wskbd.4 instead.

Note in the wskbd.4 page that while all layouts are generally supported
by pckbd(4) and ukbd(4), older keyboard interfaces might only support
a subset.


(nia)
diff -r1.29 -r1.30 src/sbin/wsconsctl/wsconsctl.8
diff -r1.24 -r1.25 src/share/man/man4/pckbd.4
diff -r1.17 -r1.18 src/share/man/man4/wskbd.4

cvs diff -r1.29 -r1.30 src/sbin/wsconsctl/wsconsctl.8 (expand / switch to unified diff)

--- src/sbin/wsconsctl/wsconsctl.8 2020/07/12 03:37:06 1.29
+++ src/sbin/wsconsctl/wsconsctl.8 2020/07/13 11:14:12 1.30
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: wsconsctl.8,v 1.29 2020/07/12 03:37:06 nia Exp $ 1.\" $NetBSD: wsconsctl.8,v 1.30 2020/07/13 11:14:12 nia Exp $
2.\" 2.\"
3.\" Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. 3.\" Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Juergen Hannken-Illjes. 7.\" by Juergen Hannken-Illjes.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"/ 29.\"/
30.Dd July 12, 2020 30.Dd July 13, 2020
31.Dt WSCONSCTL 8 31.Dt WSCONSCTL 8
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm wsconsctl 34.Nm wsconsctl
35.Nd get or set wscons state 35.Nd get or set wscons state
36.Sh SYNOPSIS 36.Sh SYNOPSIS
37.Nm 37.Nm
38.Op Fl dkmn 38.Op Fl dkmn
39.Op Fl f Ar file 39.Op Fl f Ar file
40.Fl a 40.Fl a
41.Nm 41.Nm
42.Op Fl dkmn 42.Op Fl dkmn
43.Op Fl f Ar file 43.Op Fl f Ar file
@@ -104,50 +104,45 @@ can all be found in the @@ -104,50 +104,45 @@ can all be found in the
104file. 104file.
105.Pp 105.Pp
106The mouse types are defined in the 106The mouse types are defined in the
107.Pa /usr/include/dev/wscons/wsconsio.h 107.Pa /usr/include/dev/wscons/wsconsio.h
108file. 108file.
109.Pp 109.Pp
110The display types, height, width, depth (bits per pixel), color 110The display types, height, width, depth (bits per pixel), color
111map size, and color map are defined in the 111map size, and color map are defined in the
112.Pa /usr/include/dev/wscons/wsconsio.h 112.Pa /usr/include/dev/wscons/wsconsio.h
113file. 113file.
114There are also definitions relating to video control and cursor 114There are also definitions relating to video control and cursor
115control, which are not applicable to all display types, and to text 115control, which are not applicable to all display types, and to text
116emulation and graphics (mapped) modes. 116emulation and graphics (mapped) modes.
117.Pp 
118In addition to British, US, and US-Dvorak keyboard encodings, 
119support currently exists for the following languages: Belgian, 
120Brazilian, Danish, Finnish, French, German, Greek, Hungarian, 
121Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Spanish, 
122Swedish, Swiss, Turkish, and Ukrainian. 
123Additionally, a user-defined encoding is supported. 
124.Sh FILES 117.Sh FILES
125.Bl -tag -width /dev/wsmouse 118.Bl -tag -width /dev/wsmouse
126.It Pa /dev/wskbd 119.It Pa /dev/wskbd
127keyboard control device 120keyboard control device
128.It Pa /dev/wsmouse 121.It Pa /dev/wsmouse
129mouse control device 122mouse control device
130.It Pa /dev/ttyE0 123.It Pa /dev/ttyE0
131display control device 124display control device
132.El 125.El
133.Sh EXAMPLES 126.Sh EXAMPLES
134The following are just a few examples of 127The following are just a few examples of
135.Nm 128.Nm
136and its functionality. 129and its functionality.
137.Pp 130.Pp
138.Dl wsconsctl -w encoding=uk 131.Dl wsconsctl -w encoding=uk
139.Pp 132.Pp
140Set a UK keyboard encoding. 133Set a UK keyboard encoding.
 134For a full list of supported keyboard encodings, see
 135.Xr wskbd 4 .
141.Pp 136.Pp
142.Dl wsconsctl -w map+="keysym Caps_Lock = Control_L" 137.Dl wsconsctl -w map+="keysym Caps_Lock = Control_L"
143.Pp 138.Pp
144Modify the current keyboard encoding so that when the 139Modify the current keyboard encoding so that when the
145.Ar Caps Lock 140.Ar Caps Lock
146key is pressed, the same encoding sequence as 141key is pressed, the same encoding sequence as
147.Ar Left Control 142.Ar Left Control
148is sent. 143is sent.
149For a full list of keysyms and keycodes, please refer to the 144For a full list of keysyms and keycodes, please refer to the
150.Pa /usr/include/dev/wscons/wsksymdef.h 145.Pa /usr/include/dev/wscons/wsksymdef.h
151file. 146file.
152.Pp 147.Pp
153.Dl wsconsctl -w encoding=us.swapctrlcaps 148.Dl wsconsctl -w encoding=us.swapctrlcaps
@@ -191,23 +186,23 @@ Turn off auto repeat. @@ -191,23 +186,23 @@ Turn off auto repeat.
191If scroll support is enabled in the kernel, set the number of lines 186If scroll support is enabled in the kernel, set the number of lines
192used in the fast scroll function to 50. 187used in the fast scroll function to 50.
193.Pp 188.Pp
194.Dl wsconsctl -d -w scroll.slowlines=2 189.Dl wsconsctl -d -w scroll.slowlines=2
195.Pp 190.Pp
196If scroll support is enabled in the kernel, set the number of lines 191If scroll support is enabled in the kernel, set the number of lines
197used in the slow scroll function to 2. 192used in the slow scroll function to 2.
198In order to use this function, you have to have 193In order to use this function, you have to have
199.Dv Cmd_ScrollSlowDown 194.Dv Cmd_ScrollSlowDown
200and 195and
201.Dv Cmd_ScrollSlowUp 196.Dv Cmd_ScrollSlowUp
202defined in your keyboard map. 197defined in your keyboard map.
203.Sh SEE ALSO 198.Sh SEE ALSO
204.Xr pckbd 4 , 
205.Xr wscons 4 , 199.Xr wscons 4 ,
 200.Xr wskbd 4 ,
206.Xr wscons.conf 5 , 201.Xr wscons.conf 5 ,
207.Xr wsconscfg 8 , 202.Xr wsconscfg 8 ,
208.Xr wsfontload 8 203.Xr wsfontload 8
209.Sh HISTORY 204.Sh HISTORY
210The 205The
211.Nm 206.Nm
212command first appeared in 207command first appeared in
213.Nx 1.4 . 208.Nx 1.4 .

cvs diff -r1.24 -r1.25 src/share/man/man4/pckbd.4 (expand / switch to unified diff)

--- src/share/man/man4/pckbd.4 2020/07/13 08:59:34 1.24
+++ src/share/man/man4/pckbd.4 2020/07/13 11:14:12 1.25
@@ -1,40 +1,40 @@ @@ -1,40 +1,40 @@
1.\" $NetBSD: pckbd.4,v 1.24 2020/07/13 08:59:34 wiz Exp $ 1.\" $NetBSD: pckbd.4,v 1.25 2020/07/13 11:14:12 nia Exp $
2.\" 2.\"
3.\" Copyright (c) 1999 3.\" Copyright (c) 1999
4.\" Matthias Drochner. All rights reserved. 4.\" Matthias Drochner. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE. 25.\" SUCH DAMAGE.
26.\" 26.\"
27.Dd July 12, 2020 27.Dd July 13, 2020
28.Dt PCKBD 4 28.Dt PCKBD 4
29.Os 29.Os
30.Sh NAME 30.Sh NAME
31.Nm pckbd 31.Nm pckbd
32.Nd PC keyboard driver for wscons 32.Nd PC keyboard driver for wscons
33.Sh SYNOPSIS 33.Sh SYNOPSIS
34.Cd pckbc* at isa? 34.Cd pckbc* at isa?
35.Cd pckbd* at pckbc? 35.Cd pckbd* at pckbc?
36.Cd "wskbd* at pckbd? console ?" 36.Cd "wskbd* at pckbd? console ?"
37.Cd options PCKBD_LAYOUT=XXX 37.Cd options PCKBD_LAYOUT=XXX
38.Sh DESCRIPTION 38.Sh DESCRIPTION
39This driver supports PC/AT keyboards within the 39This driver supports PC/AT keyboards within the
40.Xr wscons 4 40.Xr wscons 4
@@ -46,122 +46,38 @@ interface. @@ -46,122 +46,38 @@ interface.
46.Pp 46.Pp
47The 47The
48.Nm 48.Nm
49driver supports a number of different key mappings which 49driver supports a number of different key mappings which
50can be chosen from with the kernel option 50can be chosen from with the kernel option
51.Li PCKBD_LAYOUT 51.Li PCKBD_LAYOUT
52at compile time or with the utility 52at compile time or with the utility
53.Xr wsconsctl 8 53.Xr wsconsctl 8
54(variable: 54(variable:
55.Dq encoding ) 55.Dq encoding )
56at runtime. 56at runtime.
57Other mappings can be used if the whole keymap is replaced by means of 57Other mappings can be used if the whole keymap is replaced by means of
58.Xr wsconsctl 8 . 58.Xr wsconsctl 8 .
59The builtin mappings are at this time: 
60.Bl -column " KB_US|KB_COLEMAK" "wsconsctl" "language" 
61.It Sy "option" Ta Sy "wsconsctl" Ta Sy "language" 
62.It Li KB_US Ta us Ta English/US keyboard mapping (default) 
63.It Li KB_UK Ta uk Ta English/UK keyboard mapping 
64.It Li KB_BE Ta be Ta Belgian 
65.It Li KB_BR Ta br Ta Brazilian with 
66.Dq dead accents 
67.It Li KB_CZ Ta cz Ta Czech (QWERTY) 
68.It Li KB_DK Ta dk Ta Danish with 
69.Dq dead accents 
70.It Li KB_NL Ta nl Ta Dutch 
71.It Li KB_FI Ta fi Ta Finnish 
72.It Li KB_FR Ta fr Ta French 
73.It Li KB_DE Ta de Ta German with 
74.Dq dead accents 
75.It Li KB_GR Ta gr Ta Greek 
76.It Li KB_HU Ta hu Ta Hungarian 
77.It Li KB_IT Ta it Ta Italian 
78.It Li KB_JP Ta jp Ta Japanese 
79.It Li KB_NO Ta no Ta Norwegian with 
80.Dq dead accents 
81.It Li KB_PL Ta pl Ta Polish 
82.It Li KB_PT Ta pt Ta Portuguese 
83.It Li KB_RU Ta ru Ta Russian 
84.It Li KB_ES Ta es Ta Spanish 
85.It Li KB_SV Ta sv Ta Swedish with 
86.Dq dead accents 
87.It Li KB_SF Ta sf Ta Swiss French 
88.It Li KB_SG Ta sg Ta Swiss German 
89.It Li KB_TR Ta tr Ta Turkish with 
90.Dq dead accents 
91.It Li KB_UA Ta ua Ta Ukrainian 
92.It Li "KB_US|KB_DECLK" Ta \&us.declk Ta English/US mapping for Tn DEC 
93.It Ta Ta LK400-style keyboards with PC keyboard 
94.It Ta Ta interface (e.g., LK461) 
95.It Li "KB_US|KB_DVORAK" Ta us.dvorak Ta English/US keyboard with 
96.It Ta Ta Do Dvorak Dc layout 
97.It Li "KB_US|KB_COLEMAK" Ta us.colemak Ta English/US keyboard with 
98.It Ta Ta Do Colemak Dc layout 
99.El 
100.Pp 
101The 
102.Li KB_BR , 
103.Li KB_DE , 
104.Li KB_DK , 
105.Li KB_NO , 
106.Li KB_NL , 
107.Li KB_SF , 
108.Li KB_SG , 
109.Li KB_SV , 
110and 
111.Li KB_TR 
112mappings can be used in the 
113.Li KB_NODEAD ( 
114.Dq .nodead ) 
115variant. 
116This switches off the 
117.Dq dead accents . 
118.Pp 
119The 
120.Li KB_US , 
121.Li KB_UK , 
122.Li KB_FR , 
123.Li KB_JP 
124and 
125.Li KB_US|KB_DVORAK 
126mappings can be modified 
127to swap the left CTRL and the CAPS LOCK keys by the 
128.Li KB_SWAPCTRLCAPS 
129variant bit or the 
130.Dq .swapctrlcaps 
131suffix. 
132.Pp 
133The 
134.Li KB_METAESC ( 
135.Dq .metaesc ) 
136option can be applied to any layout. 
137If set, keys pressed together 
138with the ALT modifier are prefixed by an ESC character. 
139(Standard behaviour is to add 128 to the ASCII value.) 
140.Pp 59.Pp
141Because PC keyboard hardware doesn't contain a beeper, requests for 60Because PC keyboard hardware doesn't contain a beeper, requests for
142.Dq keyboard beeps 61.Dq keyboard beeps
143cannot be handled directly. 62cannot be handled directly.
144On alpha and i386 a helper device attached 63On alpha and i386 a helper device attached
145to the 64to the
146.Xr pcppi 4 65.Xr pcppi 4
147driver allows the use of the standard ISA speaker for this purpose. 66driver allows the use of the standard ISA speaker for this purpose.
148On acorn32, 67On acorn32,
149.Xr acorn32/vidcaudio 4 68.Xr acorn32/vidcaudio 4
150performs this function. 69performs this function.
151.Sh EXAMPLES 70.Sh EXAMPLES
152To set a German keyboard layout without 71To set a German keyboard layout without
153.Dq dead accents 72.Dq dead accents
154and sending an ESC character before the key symbol if the ALT 73and sending an ESC character before the key symbol if the ALT
155key is pressed simultaneously, use 74key is pressed simultaneously, use
156.Ic wsconsctl Fl w Ar encoding=de.nodead.metaesc . 75.Ic wsconsctl Fl w Ar encoding=de.nodead.metaesc .
157To set it at kernel build time, add 76To set it at kernel build time, add
158.D1 Cd options PCKBD_LAYOUT="(KB_DE | KB_NODEAD | KB_METAESC)" 77.D1 Cd options PCKBD_LAYOUT="(KB_DE | KB_NODEAD | KB_METAESC)"
159to the kernel configuration file. 78to the kernel configuration file.
160.Sh SEE ALSO 79.Sh SEE ALSO
161.Xr isa 4 , 80.Xr isa 4 ,
162.Xr pcppi 4 , 81.Xr pcppi 4 ,
163.Xr wskbd 4 , 82.Xr wskbd 4 ,
164.Xr wsconsctl 8 83.Xr wsconsctl 8
165.Sh BUGS 
166The list of builtin mappings doesn't follow any logic. 
167It grew as people submitted what they needed. 

cvs diff -r1.17 -r1.18 src/share/man/man4/wskbd.4 (expand / switch to unified diff)

--- src/share/man/man4/wskbd.4 2019/08/12 11:11:28 1.17
+++ src/share/man/man4/wskbd.4 2020/07/13 11:14:12 1.18
@@ -1,40 +1,40 @@ @@ -1,40 +1,40 @@
1.\" $NetBSD: wskbd.4,v 1.17 2019/08/12 11:11:28 nia Exp $ 1.\" $NetBSD: wskbd.4,v 1.18 2020/07/13 11:14:12 nia Exp $
2.\" 2.\"
3.\" Copyright (c) 1999 3.\" Copyright (c) 1999
4.\" Matthias Drochner. All rights reserved. 4.\" Matthias Drochner. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE. 25.\" SUCH DAMAGE.
26.\" 26.\"
27.Dd May 27, 2012 27.Dd July 13, 2020
28.Dt WSKBD 4 28.Dt WSKBD 4
29.Os 29.Os
30.Sh NAME 30.Sh NAME
31.Nm wskbd 31.Nm wskbd
32.Nd generic keyboard support in wscons 32.Nd generic keyboard support in wscons
33.Sh SYNOPSIS 33.Sh SYNOPSIS
34.Cd "wskbd* at pckbd? console ? mux 1" 34.Cd "wskbd* at pckbd? console ? mux 1"
35(standard PC keyboard) 35(standard PC keyboard)
36.Cd "wskbd* at ukbd? console ? mux 1" 36.Cd "wskbd* at ukbd? console ? mux 1"
37(USB keyboard) 37(USB keyboard)
38.Cd "wskbd* at lkkbd? console ? mux 1" 38.Cd "wskbd* at lkkbd? console ? mux 1"
39(DEC LK200/400 serial keyboard) 39(DEC LK200/400 serial keyboard)
40.Cd "wskbd0 at akbd? console ? mux 1" 40.Cd "wskbd0 at akbd? console ? mux 1"
@@ -104,26 +104,107 @@ A complete list is in @@ -104,26 +104,107 @@ A complete list is in
104The 104The
105.Xr wsconsctl 8 105.Xr wsconsctl 8
106utility allows to access key maps and other variables. 106utility allows to access key maps and other variables.
107.Pp 107.Pp
108The 108The
109.Em console 109.Em console
110locator in the configuration line refers to the device's use as input 110locator in the configuration line refers to the device's use as input
111part of the operating system console. 111part of the operating system console.
112A device specification containing a positive value here will only 112A device specification containing a positive value here will only
113match if the device is in use as system console. 113match if the device is in use as system console.
114(The console device selection in early system startup is not influenced.) 114(The console device selection in early system startup is not influenced.)
115This way, the console device can be connected to a known 115This way, the console device can be connected to a known
116wskbd device instance. 116wskbd device instance.
 117.Ss Keyboard encodings
 118The following encodings are supported.
 119Device drivers for legacy keyboard interfaces may only support a subset
 120of these.
 121However, generally, all encodings are supported by
 122.Xr pckbd 4 and
 123.Xr ukbd 4 .
 124.Bl -column " us.colemak" " KB_US|KB_COLEMAK" "language"
 125.It Sy "wsconsctl" Ta Sy "define" Ta Sy "language"
 126.It Li user Ta KB_USER Ta User-defined
 127.It Li us Ta KB_US Ta English/US keyboard mapping (default)
 128.It Li uk Ta KB_UK Ta English/UK keyboard mapping
 129.It Li be Ta KB_BE Ta Belgian
 130.It Li br Ta KB_BR Ta Brazilian with
 131.Dq dead accents
 132.It Li cf Ta KB_CF Ta Canadian French
 133.It Li cz Ta KB_CZ Ta Czech (QWERTY)
 134.It Li dk Ta KB_DK Ta Danish with
 135.Dq dead accents
 136.It Li nl Ta KB_NL Ta Dutch
 137.It Li ee Ta KB_DK Ta Estonian with
 138.Dq dead accents
 139.It Li fi Ta KB_FI Ta Finnish
 140.It Li fr Ta KB_FR Ta French
 141.It Li de Ta KB_DE Ta German with
 142.Dq dead accents
 143.It Li gr Ta KB_GR Ta Greek
 144.It Li hu Ta KB_HU Ta Hungarian
 145.It Li is Ta KB_IS Ta Icelandic with
 146.Dq dead accents
 147.It Li it Ta KB_IT Ta Italian
 148.It Li jp Ta KB_JP Ta Japanese
 149.It Li no Ta KB_NO Ta Norwegian with
 150.Dq dead accents
 151.It Li pl Ta KB_PL Ta Polish
 152.It Li pt Ta KB_PT Ta Portuguese
 153.It Li ru Ta KB_RU Ta Russian
 154.It Li es Ta KB_ES Ta Spanish
 155.It Li sv Ta KB_SV Ta Swedish with
 156.Dq dead accents
 157.It Li sf Ta KB_SF Ta Swiss French
 158.It Li sg Ta KB_SG Ta Swiss German
 159.It Li tr Ta KB_TR Ta Turkish (QWERTY) with
 160.Dq dead accents
 161.It Li ua Ta KB_UA Ta Ukrainian
 162.It Li \&us.declk Ta "KB_US|KB_DECLK" Ta English/US mapping for Tn DEC
 163.It Ta Ta LK400-style keyboards with PC keyboard
 164.It Ta Ta interface (e.g., LK461)
 165.It Li us.dvorak Ta "KB_US|KB_DVORAK" Ta English/US keyboard with
 166.It Ta Ta Do Dvorak Dc layout
 167.It Li us.colemak Ta "KB_US|KB_COLEMAK" Ta English/US keyboard with
 168.It Ta Ta Do Colemak Dc layout
 169.El
 170.Pp
 171.Li KB_NODEAD (
 172.Dq .nodead )
 173can be applied to layouts with
 174.Dq dead accents
 175to switch them off.
 176.Pp
 177The
 178.Li KB_US ,
 179.Li KB_UK ,
 180.Li KB_FR ,
 181.Li KB_JP
 182and
 183.Li KB_US|KB_DVORAK
 184mappings can be modified
 185to swap the left CTRL and the CAPS LOCK keys by the
 186.Li KB_SWAPCTRLCAPS
 187variant bit or the
 188.Dq .swapctrlcaps
 189suffix.
 190.Pp
 191The
 192.Li KB_METAESC (
 193.Dq .metaesc )
 194option can be applied to any layout.
 195If set, keys pressed together
 196with the ALT modifier are prefixed by an ESC character.
 197(Standard behaviour is to add 128 to the ASCII value.)
117.Ss Ioctls 198.Ss Ioctls
118The following 199The following
119.Xr ioctl 2 200.Xr ioctl 2
120calls are provided by the 201calls are provided by the
121.Nm 202.Nm
122driver or by devices which use it. 203driver or by devices which use it.
123Their definitions are found in 204Their definitions are found in
124.Pa dev/wscons/wsconsio.h . 205.Pa dev/wscons/wsconsio.h .
125.Bl -tag -width Dv 206.Bl -tag -width Dv
126.It Dv WSKBDIO_GTYPE 207.It Dv WSKBDIO_GTYPE
127Get the keyboard type. 208Get the keyboard type.
128.It Dv WSKBDIO_COMPLEXBELL, WSKBDIO_SETBELL, WSKBDIO_GETBELL, WSKBDIO_SETDEFAULTBELL, WSKBDIO_GETDEFAULTBELL Pq Li "struct wsmouse_repeat" 209.It Dv WSKBDIO_COMPLEXBELL, WSKBDIO_SETBELL, WSKBDIO_GETBELL, WSKBDIO_SETDEFAULTBELL, WSKBDIO_GETDEFAULTBELL Pq Li "struct wsmouse_repeat"
129Get and set keyboard bell settings. 210Get and set keyboard bell settings.
@@ -159,13 +240,16 @@ if (ioctl(fd, WSKBDIO_SETVERSION, &ver)  @@ -159,13 +240,16 @@ if (ioctl(fd, WSKBDIO_SETVERSION, &ver)
159.It 240.It
160.Pa /usr/include/dev/wscons/wsksymdef.h 241.Pa /usr/include/dev/wscons/wsksymdef.h
161.It 242.It
162.Pa /usr/include/dev/wscons/wsconsio.h . 243.Pa /usr/include/dev/wscons/wsconsio.h .
163.El 244.El
164.Sh SEE ALSO 245.Sh SEE ALSO
165.Xr btkbd 4 , 246.Xr btkbd 4 ,
166.Xr pckbd 4 , 247.Xr pckbd 4 ,
167.Xr ukbd 4 , 248.Xr ukbd 4 ,
168.Xr wscons 4 , 249.Xr wscons 4 ,
169.Xr wsmux 4 , 250.Xr wsmux 4 ,
170.Xr wsconsctl 8 , 251.Xr wsconsctl 8 ,
171.Xr wskbd 9 252.Xr wskbd 9
 253.Sh BUGS
 254The list of builtin mappings doesn't follow any logic.
 255It grew as people submitted what they needed.