reform

MNT Reform: Open Source Portable Computer
Log (Feed) | Files | Refs (Tags) | README

commit d4211b2c50e96e34b39f85556e9c8e6ae62b55a6
parent f2e949b0765b7f2e72e216693709597f426c6d19
Author: Dirk Eibach <dirk.eibach@gmx.de>
Date:   Wed,  8 Nov 2023 16:49:00 +0100

Add option KBD_SWP_CTRL for swapping Ctrl- and Hyper-Keys.

Diffstat:
Mreform2-keyboard-fw/README.md | 2++
Mreform2-keyboard-fw/matrix_3.h | 14+++++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/reform2-keyboard-fw/README.md b/reform2-keyboard-fw/README.md @@ -58,5 +58,7 @@ standalone keyboard for, define `KBD_MODE_STANDALONE` using make REFORM_KBD_OPTIONS="-DKBD_VARIANT_3_US -DKBD_MODE_STANDALONE" make REFORM_KBD_OPTIONS="-DKBD_VARIANT_3 -DKBD_MODE_STANDALONE" +For keyboard 3 there is also an option to swap Ctrl- and Hyper-Keys: `KBD_SWP_CTRL`. + To flash, put your keyboard into [flashing mode](https://mntre.com/reform2/handbook/parts.html#keyboard-firmware) and run: `sudo ./flash.sh` diff --git a/reform2-keyboard-fw/matrix_3.h b/reform2-keyboard-fw/matrix_3.h @@ -6,9 +6,17 @@ #include "keyboard.h" +#ifdef KBD_SWP_CTRL + #define R4_C1 HID_KEYBOARD_SC_EXECUTE + #define R6_C1 HID_KEYBOARD_SC_LEFT_CONTROL +#else + #define R4_C1 HID_KEYBOARD_SC_LEFT_CONTROL + #define R6_C1 HID_KEYBOARD_SC_EXECUTE +#endif + // Fourth row #define MATRIX3_DEFAULT_ROW_4 \ - HID_KEYBOARD_SC_LEFT_CONTROL,\ + R4_C1,\ KEY_A,\ KEY_S,\ KEY_D,\ @@ -25,7 +33,7 @@ // Sixth row #define MATRIX3_DEFAULT_ROW_6 \ - HID_KEYBOARD_SC_EXECUTE,\ + R6_C1,\ HID_KEYBOARD_SC_LEFT_GUI,\ HID_KEYBOARD_SC_LEFT_ALT,\ KEY_SPACE,\ @@ -103,7 +111,7 @@ uint8_t matrix_fn[KBD_MATRIX_SZ] = { HID_KEYBOARD_SC_PAGE_UP, HID_KEYBOARD_SC_RIGHT_SHIFT, - HID_KEYBOARD_SC_EXECUTE, + R6_C1, HID_KEYBOARD_SC_LEFT_GUI, HID_KEYBOARD_SC_LEFT_ALT, KEY_SPACE,