diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1334e3c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +firmware/compile_commands.json +firmware/.cache/clangd/index diff --git a/firmware/src/main.cpp b/firmware/src/main.cpp index 89dcb03..bbc73d2 100755 --- a/firmware/src/main.cpp +++ b/firmware/src/main.cpp @@ -71,8 +71,8 @@ #define KEY_OFFSET 0xAA00 // Offset to apply for not interfere with already defined keyboard keys -#define KEY_FN1 10 + KEY_OFFSET // Function layer 1 button -#define KEY_FN2 11 + KEY_OFFSET // Function layer 2 button +#define KEY_FN1 10 + KEY_OFFSET // Function layer 1 button +#define KEY_FN2 11 + KEY_OFFSET // Function layer 2 button #define KEY_WIN_LATCH 12 + KEY_OFFSET // Function layer 2 button #define TAP_TIMEOUT 150 // Key tap timeout (ms) @@ -99,12 +99,12 @@ char kp_keys[KP_ROWS][KP_COLS] = { {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, {13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}, {25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36}, - {0, 0, 0, 37, 38, 39, 40, 41, 42, 0, 0, 0}}; + {0, 0, 0, 37, 38, 39, 40, 41, 42, 0, 0, 0}, +}; Keypad kp_keypad = Keypad(makeKeymap(kp_keys), kp_rowPins, kp_colPins, KP_ROWS, KP_COLS); - -/* +/* * "Button ID" corresponding with the physical design of the actual keyboard. DO NOT CHANGE BTN ID! ------------------------------------- ------------------------------------- @@ -116,14 +116,14 @@ Keypad kp_keypad = Keypad(makeKeymap(kp_keys), kp_rowPins, kp_colPins, KP_ROWS, * "Fn0 key" is the layer 0 key to use. * "Fn1 key" is the layer 1 key to use. Don NOT add KEY_FN1 or KEY_FN2 to this layer. * "Fn2 key" is the layer 2 key to use. Don NOT add KEY_FN1 or KEY_FN2 to this layer. - + /* Keymap config ----------------------------------------------------------------------------------------------------------------------------------- */ // clang-format off Button buttons[NBR_OF_BUTTONS] = { /* Btn ID Fn0 (hold) key Fn1 key Fn2 key */ - {1, KEY_ESC, KEY_TAB, KEY_F11, IDLE, NO_KEY, false}, + {1, KEY_TAB, KEY_ESC, KEY_F11, IDLE, NO_KEY, false}, {2, KEY_Q, KEY_F1, KEY_F12, IDLE, NO_KEY, false}, {3, KEY_W, KEY_F2, KEY_F13, IDLE, NO_KEY, false}, {4, KEY_E, KEY_F3, KEY_F14, IDLE, NO_KEY, false}, @@ -243,7 +243,6 @@ void scan_buttons() /* Scan keypad */ if (kp_keypad.getKeys()) { - /* Enter bootloader if all four corner-buttons is pressed together */ int reboot = 0; for (int i = 0; i < LIST_MAX; i++) @@ -290,7 +289,7 @@ void scan_buttons() } } } - + /* Process key press/release */ for (int i = 0; i < LIST_MAX; i++) {