diff options
author | George Koehler <gkoehler@cvs.openbsd.org> | 2024-07-02 05:50:03 +0000 |
---|---|---|
committer | George Koehler <gkoehler@cvs.openbsd.org> | 2024-07-02 05:50:03 +0000 |
commit | 2f4057febac377f815f76574ba5affdf3833d4a8 (patch) | |
tree | 47434ce8dfca8f180c514d926ed4e4a77132fbef /sys/dev | |
parent | 4b491689ef44a726793d2c2228c6e041d79449bd (diff) |
Support numpad on newer macppc Apple PowerBooks
This is for newer PowerBooks with ukbd(4), and doesn't affect older
models with akbd(4). The Fn key now makes a numpad,
7 8 9 0 - 7 8 9 / =
U I O P => 4 5 6 *
J K L ; 1 2 3 -
M . / 0 . +
Also, Fn+F6 is Num Lock. This acts like Num Lock on other USB
keyboards, and unlike Num Lock on akbd(4).
From jon (at) elytron (dot) openbsd (dot) amsterdam
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/hid/hidkbd.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/hid/hidkbd.c b/sys/dev/hid/hidkbd.c index 4caf7ac7f0f..cf1c03b6579 100644 --- a/sys/dev/hid/hidkbd.c +++ b/sys/dev/hid/hidkbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hidkbd.c,v 1.12 2024/01/03 21:41:44 tobhe Exp $ */ +/* $OpenBSD: hidkbd.c,v 1.13 2024/07/02 05:50:02 gkoehler Exp $ */ /* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -141,9 +141,26 @@ static const struct hidkbd_translation apple_fn_trans[] = { { 60, 127 }, /* F3 -> audio mute */ { 61, 129 }, /* F4 -> audio lower */ { 62, 128 }, /* F5 -> audio raise */ + { 63, 83 }, /* F6 -> num lock */ { 65, 234 }, /* F8 -> backlight toggle */ { 66, 236 }, /* F9 -> backlight lower */ { 67, 235 }, /* F10 -> backlight raise */ + { 39, 84 }, /* keypad divide */ + { 19, 85 }, /* keypad multiply */ + { 51, 86 }, /* keypad substract */ + { 56, 87 }, /* keypad add */ + { 13, 89 }, /* keypad 1 */ + { 14, 90 }, /* keypad 2 */ + { 15, 91 }, /* keypad 3 */ + { 24, 92 }, /* keypad 4 */ + { 12, 93 }, /* keypad 5 */ + { 18, 94 }, /* keypad 6 */ + { 36, 95 }, /* keypad 7 */ + { 37, 96 }, /* keypad 8 */ + { 38, 97 }, /* keypad 9 */ + { 16, 98 }, /* keypad 0 */ + { 55, 99 }, /* keypad decimal */ + { 45, 103 }, /* keypad equal */ #else { 63, 102 }, /* F6 -> sleep */ { 67, 127 }, /* F10 -> audio mute */ |