xref: /netbsd-src/share/man/man4/akbd.4 (revision 8c390144054c38168f5a46abc7ceae6fc4014483)
1.\"	$NetBSD: akbd.4,v 1.4 2025/01/21 16:03:32 uwe Exp $
2.\"
3.\" Copyright (c) 2003 Alex Zepeda <zipzippy@sonic.net>
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.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"      This product includes software developed by Alex Zepeda.
17.\" 4. The name of the author may not be used to endorse or promote products
18.\"    derived from this software without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30.\"
31.Dd January 20, 2025
32.Dt AKBD 4
33.Os
34.
35.Sh NAME
36.
37.Nm akbd
38.Nd Apple Desktop Bus keyboard driver for wscons
39.Sh SYNOPSIS
40.Cd "akbd* at obio?"
41.Cd "wskbd* at akbd? console ?"
42.Pp
43.Cd "options ALTXBUTTONS"
44.Cd "options CAPS_IS_CONTROL"
45.Cd "options FORCE_FUNCTION_KEYS"
46.
47.Sh DESCRIPTION
48.
49This driver provides the
50.Xr wscons 4
51driver with support for Apple Desktop Bus keyboards.
52.Bl -tag -width Cd
53.
54.It Cd "options ALTXBUTTONS"
55.
56To map
57.Sm off
58.Ao Option Ac \&+ Aq 1 ,
59.Sm on
60.Sm off
61.Ao Option Ac \&+ Aq 2 ,
62.Sm on
63.Sm off
64.Ao Option Ac \&+ Aq 3 ,
65.Sm on
66to mouse buttons 1, 2, and 3
67respectively.
68.
69.It Cd options CAPS_IS_CONTROL
70.
71On macppc systems it is possible to tweak the keyboard driver to treat
72the caps lock key on an
73.Tn ADB
74keyboard as a control key.
75This requires special remapping because of
76.Tn ADB Ap s
77strange emulation of a mechanically-locked key.
78.
79.It Cd options FORCE_FUNCTION_KEYS
80.
81On macppc PowerBooks, several function keys double as
82.Dq hot keys
83.Pq brightness, volume, eject
84when the
85.Aq \&Fn
86modifier is held down.
87Mac OS\~X likes to reprogram the keyboard controller to send hot key
88events when
89.Aq \&Fn
90is
91.Em not
92held down and send function key events when it is.
93With this option you can transform the non-keyboard
94.Dq button
95events back into function key events.
96.El
97.
98.Ss Special Keys
99.
100To work around the limited number of buttons found on most
101.Tn ADB
102mice, the following key sequences trigger mouse button events:
103.Pp
104.Bl -dash -compact
105.It
106.Sm off
107.Ao Option Ac \&+ Aq LeftArrow
108.Sm on
109will work as the middle mouse button.
110.It
111.Sm off
112.Ao Option Ac \&+ Aq RightArrow
113.Sm on
114will work as the right mouse button.
115.El
116.Pp
117On PowerBook (mac68k) models the following key sequences are also
118significant:
119.Pp
120.Bl -dash -compact
121.It
122.Sm off
123.Ao Option Ac \&+ Aq UpArrow
124.Sm on
125increase screen brightness.
126.It
127.Sm off
128.Ao Option Ac \&+ Aq DownArrow
129.Sm on
130decrease screen brightness.
131.El
132.
133.Ss Supported Hardware
134.
135.Nx
136is known to support the following
137.Tn ADB
138keyboards:
139.Pp
140.Bl -bullet -offset indent -compact
141.It
142On-board keyboards on PowerBook models
143.It
144Apple Standard Keyboard
145.It
146Apple Keyboard II
147.It
148Apple Extended Keyboard
149.It
150Apple Extended Keyboard II
151.It
152Apple Adjustable Keyboard
153.It
154Most third-party
155.Tn ADB
156keyboards are supported
157.El
158.
159.Sh SEE ALSO
160.
161.Xr xmodmap 1 ,
162.Xr adb 4 ,
163.Xr wscons 4 ,
164.Xr wskbd 4 ,
165.Xr wsconsctl 8
166.
167.Sh BUGS
168.
169The number pad on extended keyboards does not send out the proper
170key codes for many applications.
171.Pp
172The LEDs on extended keyboards are not functional under
173.Nx .
174.Pp
175In X11 with the default key mapping, middle and right mouse button events will
176hold
177.Ql Meta_L
178and this will clobber the intended mouse button.
179.Aq Option
180shoud be remapped with
181.Xr xmodmap 1
182to the
183.Aq Command
184key:
185.Bd -literal -offset indent
186remove Mod4 = Super_L
187remove Mod1 = Alt_L
188add Mod1 = Super_L
189.Ed
190