ref: b38a3d2a0d0f2022bab40eec4975179daa0ceee1
parent: 6960465997ff708b06410d0a93b629ec75e476c9
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Oct 6 15:45:25 EDT 2022
nusb/kb, aux/kbdfs: add brightness down/up media keys
--- a/sys/include/keyboard.h
+++ b/sys/include/keyboard.h
@@ -45,12 +45,14 @@
Kscrollonedown= KF|0x21,
/* multimedia keys - no refunds */
- Ksbwd= KF|0x22,
- Ksfwd= KF|0x23,
- Kpause= KF|0x24,
- Kvoldn= KF|0x25,
- Kvolup= KF|0x26,
- Kmute= KF|0x27,
+ Ksbwd= KF|0x22, /* skip backwards */
+ Ksfwd= KF|0x23, /* skip forward */
+ Kpause= KF|0x24, /* play/pause */
+ Kvoldn= KF|0x25, /* volume decrement */
+ Kvolup= KF|0x26, /* volume increment */
+ Kmute= KF|0x27, /* (un)mute */
+ Kbrtdn= KF|0x28, /* brightness decrement */
+ Kbrtup= KF|0x29, /* brightness increment */
Ksoh= 0x01,
Kstx= 0x02,
--- a/sys/lib/kbmap/us
+++ b/sys/lib/kbmap/us
@@ -271,7 +271,7 @@
2 14 0
2 15 0
2 16 0xf022
-2 17 0
+2 17 0xf028
2 18 0
2 19 0
2 20 0
@@ -280,7 +280,7 @@
2 23 0
2 24 0
2 25 0xf023
-2 26 0
+2 26 0xf029
2 27 0
2 28 ^J
2 29 0xf862
--- a/sys/src/cmd/aux/kbdfs/kbdfs.c
+++ b/sys/src/cmd/aux/kbdfs/kbdfs.c
@@ -171,8 +171,8 @@
{
[0x00] 0, 0, 0, 0, 0, 0, 0, 0,
[0x08] 0, 0, 0, 0, 0, 0, 0, 0,
-[0x10] Ksbwd, 0, 0, 0, 0, 0, 0, 0,
-[0x18] 0, Ksfwd, 0, 0, '\n', Kctl, 0, 0,
+[0x10] Ksbwd, Kbrtdn, 0, 0, 0, 0, 0, 0,
+[0x18] 0, Ksfwd, Kbrtup, 0, '\n', Kctl, 0, 0,
[0x20] Kmute, 0,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