commit d4f2271a96046c160cd7472b5438c1dee85e11e4
parent 7bf4443e8028681c9c9f5bc97df0f5b21bedf09f
Author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
Date: Thu, 6 Oct 2022 18:12:04 +0200
keyboard-fw: use the right scancodes for prev/next track to avoid possible confusion
Diffstat:
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/reform2-keyboard-fw/keyboard.c b/reform2-keyboard-fw/keyboard.c
@@ -104,14 +104,14 @@ inline bool is_media_key(uint8_t keycode) {
void get_media_keys(uint8_t keycode, USB_MediaReport_Data_t* mcr) {
switch (keycode) {
- case HID_KEYBOARD_SC_MEDIA_MUTE: mcr->Mute = 1; break;
- case HID_KEYBOARD_SC_MEDIA_VOLUME_UP: mcr->VolumeUp = 1; break;
- case HID_KEYBOARD_SC_MEDIA_VOLUME_DOWN: mcr->VolumeDown = 1; break;
- case HID_KEYBOARD_SC_MEDIA_BACKWARD: mcr->PreviousTrack = 1; break;
- case HID_KEYBOARD_SC_MEDIA_FORWARD: mcr->NextTrack = 1; break;
- case HID_KEYBOARD_SC_MEDIA_PLAY: mcr->PlayPause = 1; break;
case HID_KEYBOARD_SC_MEDIA_BRIGHTNESS_DOWN: mcr->BrightnessDown = 1; break;
case HID_KEYBOARD_SC_MEDIA_BRIGHTNESS_UP: mcr->BrightnessUp = 1; break;
+ case HID_KEYBOARD_SC_MEDIA_PREVIOUS_TRACK: mcr->PreviousTrack = 1; break;
+ case HID_KEYBOARD_SC_MEDIA_PLAY: mcr->PlayPause = 1; break;
+ case HID_KEYBOARD_SC_MEDIA_NEXT_TRACK: mcr->NextTrack = 1; break;
+ case HID_KEYBOARD_SC_MEDIA_MUTE: mcr->Mute = 1; break;
+ case HID_KEYBOARD_SC_MEDIA_VOLUME_DOWN: mcr->VolumeDown = 1; break;
+ case HID_KEYBOARD_SC_MEDIA_VOLUME_UP: mcr->VolumeUp = 1; break;
}
}
diff --git a/reform2-keyboard-fw/matrix.h b/reform2-keyboard-fw/matrix.h
@@ -30,9 +30,9 @@ uint8_t matrix_fn[KBD_MATRIX_SZ] = {
KEY_F4,
KEY_F5,
KEY_F6,
- HID_KEYBOARD_SC_MEDIA_BACKWARD,
+ HID_KEYBOARD_SC_MEDIA_PREVIOUS_TRACK,
HID_KEYBOARD_SC_MEDIA_PLAY,
- HID_KEYBOARD_SC_MEDIA_FORWARD,
+ HID_KEYBOARD_SC_MEDIA_NEXT_TRACK,
HID_KEYBOARD_SC_MEDIA_MUTE,
HID_KEYBOARD_SC_MEDIA_VOLUME_DOWN,
HID_KEYBOARD_SC_MEDIA_VOLUME_UP,
@@ -55,9 +55,9 @@ uint8_t matrix_fn_toggled[KBD_MATRIX_SZ] = {
KEY_F4,
KEY_F5,
KEY_F6,
- HID_KEYBOARD_SC_MEDIA_BACKWARD,
+ HID_KEYBOARD_SC_MEDIA_PREVIOUS_TRACK,
HID_KEYBOARD_SC_MEDIA_PLAY,
- HID_KEYBOARD_SC_MEDIA_FORWARD,
+ HID_KEYBOARD_SC_MEDIA_NEXT_TRACK,
HID_KEYBOARD_SC_MEDIA_MUTE,
HID_KEYBOARD_SC_MEDIA_VOLUME_DOWN,
HID_KEYBOARD_SC_MEDIA_VOLUME_UP,
diff --git a/reform2-keyboard-fw/matrix_v.h b/reform2-keyboard-fw/matrix_v.h
@@ -43,9 +43,9 @@ uint8_t matrix_fn[KBD_MATRIX_SZ] = {
KEY_F4,
KEY_F5,
KEY_F6,
- HID_KEYBOARD_SC_MEDIA_BACKWARD,
+ HID_KEYBOARD_SC_MEDIA_PREVIOUS_TRACK,
HID_KEYBOARD_SC_MEDIA_PLAY,
- HID_KEYBOARD_SC_MEDIA_FORWARD,
+ HID_KEYBOARD_SC_MEDIA_NEXT_TRACK,
HID_KEYBOARD_SC_MEDIA_MUTE,
HID_KEYBOARD_SC_MEDIA_VOLUME_DOWN,
HID_KEYBOARD_SC_MEDIA_VOLUME_UP,
@@ -96,9 +96,9 @@ uint8_t matrix_fn_toggled[KBD_MATRIX_SZ] = {
KEY_F4,
KEY_F5,
KEY_F6,
- HID_KEYBOARD_SC_MEDIA_BACKWARD,
+ HID_KEYBOARD_SC_MEDIA_PREVIOUS_TRACK,
HID_KEYBOARD_SC_MEDIA_PLAY,
- HID_KEYBOARD_SC_MEDIA_FORWARD,
+ HID_KEYBOARD_SC_MEDIA_NEXT_TRACK,
HID_KEYBOARD_SC_MEDIA_MUTE,
HID_KEYBOARD_SC_MEDIA_VOLUME_DOWN,
HID_KEYBOARD_SC_MEDIA_VOLUME_UP,