diff options
author | Tobias Heider <tobhe@cvs.openbsd.org> | 2023-11-22 18:19:26 +0000 |
---|---|---|
committer | Tobias Heider <tobhe@cvs.openbsd.org> | 2023-11-22 18:19:26 +0000 |
commit | dbc6b58e78e2aeeab94f2793c0ff8953f2df5273 (patch) | |
tree | 34699efa7ef182d1ea648f527143b6488b6d3fce /sys/dev/hid | |
parent | d09e623001e3718154fbf8398bbf96a5759ad177 (diff) |
Add support for keyboard backlight hotkeys in wskbd and hook up macppc apple
keyboards.
From jon (at) elytron (dot) openbsd (dot) amsterdam with some changes by me
ok gkoehler@
Diffstat (limited to 'sys/dev/hid')
-rw-r--r-- | sys/dev/hid/hidkbd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/hid/hidkbd.c b/sys/dev/hid/hidkbd.c index ef57b4f16a3..5f14fa5763c 100644 --- a/sys/dev/hid/hidkbd.c +++ b/sys/dev/hid/hidkbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hidkbd.c,v 1.9 2023/07/09 08:02:13 tobhe Exp $ */ +/* $OpenBSD: hidkbd.c,v 1.10 2023/11/22 18:19:25 tobhe Exp $ */ /* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -143,6 +143,9 @@ static const struct hidkbd_translation apple_fn_trans[] = { { 60, 127 }, /* F3 -> audio mute */ { 61, 129 }, /* F4 -> audio lower */ { 62, 128 }, /* F5 -> audio raise */ + { 65, 234 }, /* F8 -> backlight toggle */ + { 66, 236 }, /* F9 -> backlight lower */ + { 67, 235 }, /* F10 -> backlight raise */ #else { 63, 102 }, /* F6 -> sleep */ { 67, 127 }, /* F10 -> audio mute */ @@ -569,6 +572,9 @@ hidkbd_decode(struct hidkbd *kbd, struct hidkbd_data *ud) case 129: case 232: case 233: + case 234: + case 235: + case 236: wskbd_input(kbd->sc_wskbddev, key & RELEASE ? WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN, key & CODEMASK); |