NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/37788: Support for Apple Keyboard (August 2007 aluminum type)
>Number: 37788
>Category: kern
>Synopsis: Support for Apple Keyboard (August 2007 aluminum type)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Jan 17 14:50:02 +0000 2008
>Originator: Michael Piotrowski
>Release: NetBSD 4.0
>Organization:
>Environment:
NetBSD vmware 4.0 NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:20:10 PST 2007
builds@wb34:/home/builds/ab/netbsd-4-0-RELEASE/i386/200712160005Z-obj/home/builds/ab/netbsd-4-0-RELEASE/src/sys/arch/i386/compile/GENERIC
i386
>Description:
The Apple Keyboard (August 2007 aluminum type) has 19 function keys.
However, NetBSD doesn't recognize F16-F19.
>How-To-Repeat:
Connect an aluminum-type Apple Keyboard. Running xev, for example,
you'll notice that the keys F16-F19 are "dead."
>Fix:
Compared to standard PC keyboards, this keyboard has some extra keys
and lacks some keys. The translation table in /sys/dev/usb/ukbd.c as
shipped with NetBSD 4.0 is missing some translations for the extra
keys (see column "Keycode" in the table below). I've added codes and
modified it slightly to make the scan codes generated by F13-F15 match
the ones specified in
http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf
The resulting codes are listed in column "Keycode*" (all keycodes
refer to the codes seen by X, i.e., the codes one has to use with
xmodmap):
Extra keys:
Name Keycode Keycode* Remarks
Eject - - Can be used via usbhidaction(1)
F13 0xb6 0xbf
F14 0xb7 0xc0
F15 0xb8 0xc1
F16 - 0xc6
F17 - 0xc7
F18 - 0xc8
F19 - 0xc9
fn - -
Keypad Equals 0x9D 0x9D
I've also updated the URL to the scancode specification.
Here is the patch:
*** /sys/dev/usb/ukbd.c.orig Thu Nov 16 02:33:27 2006
--- /sys/dev/usb/ukbd.c Thu Jan 17 15:08:41 2008
***************
*** 105,109 ****
* Scancodes >= 0x80 represent EXTENDED keycodes.
*
! * See http://www.microsoft.com/HWDEV/TECH/input/Scancode.asp
*/
Static const u_int8_t ukbd_trtab[256] = {
--- 105,109 ----
* Scancodes >= 0x80 represent EXTENDED keycodes.
*
! * See http://www.microsoft.com/whdc/device/input/Scancode.mspx
*/
Static const u_int8_t ukbd_trtab[256] = {
***************
*** 121,125 ****
0x9c, 0x4f, 0x50, 0x51, 0x4b, 0x4c, 0x4d, 0x47, /* 58 - 5f */
0x48, 0x49, 0x52, 0x53, 0x56, 0xdd, NN, 0x59, /* 60 - 67 */
! 0x5d, 0x5e, 0x5f, NN, NN, NN, NN, NN, /* 68 - 6f */
NN, NN, NN, NN, NN, NN, NN, NN, /* 70 - 77 */
NN, NN, NN, NN, NN, NN, NN, NN, /* 78 - 7f */
--- 121,125 ----
0x9c, 0x4f, 0x50, 0x51, 0x4b, 0x4c, 0x4d, 0x47, /* 58 - 5f */
0x48, 0x49, 0x52, 0x53, 0x56, 0xdd, NN, 0x59, /* 60 - 67 */
! 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, NN, /* 68 - 6f */
NN, NN, NN, NN, NN, NN, NN, NN, /* 70 - 77 */
NN, NN, NN, NN, NN, NN, NN, NN, /* 78 - 7f */
Home |
Main Index |
Thread Index |
Old Index