Code cleanup
This commit is contained in:
parent
69fd50b6b7
commit
9342f95aee
@ -18,6 +18,15 @@ const uint16_t KEY_GUI_LATCH = 2 + KEY_OFFSET; // GUI latching (ex: Win) button
|
||||
|
||||
const uint8_t NBR_OF_BUTTONS = 42; // Number of buttons used (42 in this case)
|
||||
|
||||
IndicatorLed status_led = IndicatorLed(13);
|
||||
|
||||
uint64_t current_timestamp = 0;
|
||||
uint64_t button_timestamp = 0;
|
||||
uint64_t indicator_timestamp = 0;
|
||||
|
||||
bool key_pressed = false;
|
||||
bool win_latched = false;
|
||||
|
||||
const byte KP_ROWS = 4;
|
||||
const byte KP_COLS = 12;
|
||||
|
||||
@ -46,7 +55,7 @@ struct Button
|
||||
};
|
||||
|
||||
/*
|
||||
* "Button ID" corresponding with the physical design of the actual keyboard. DO NOT CHANGE BTN ID!
|
||||
* "KeyId" corresponding with the physical design of the actual keyboard.
|
||||
------------------------------------- -------------------------------------
|
||||
| 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 1O | 11 | 12 |
|
||||
| 13 | 14 | 15 | 16 | 17 | 18 | | 19 | 20 | 21 | 22 | 23 | 24 |
|
||||
@ -59,7 +68,7 @@ struct Button
|
||||
|
||||
Swedish keymap (ISO) special characters (not matching the key definition):
|
||||
|
||||
* KEY_TILE = §
|
||||
* KEY_TILDE = §
|
||||
* KEY_SEMICOLON = ö
|
||||
* KEY_QUOTE = ä
|
||||
* KEY_LEFT_BRACE = å
|
||||
@ -73,11 +82,11 @@ struct Button
|
||||
* KEY_RIGHT_ALT = AltGr
|
||||
*/
|
||||
|
||||
/* Keymap config ----------------------------------------------------------------------------------------------------------------------------------- */
|
||||
/* Keymap config ------------------------------------------------------------------------- */
|
||||
// clang-format off
|
||||
Button buttons[NBR_OF_BUTTONS] =
|
||||
{
|
||||
/* KeyId Fn0 key Fn1 key Fn2 key */
|
||||
/* KeyId Fn0 key Fn1 key Fn2 key - Do not change! - */
|
||||
/* 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},
|
||||
@ -122,16 +131,7 @@ Button buttons[NBR_OF_BUTTONS] =
|
||||
/* 42 */ {KEY_FN, KEY_RIGHT_ALT, NO_KEY, IDLE, NO_KEY, false}};
|
||||
|
||||
// clang-format on
|
||||
/* End of keymap config ----------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
IndicatorLed status_led = IndicatorLed(13);
|
||||
|
||||
uint64_t current_timestamp = 0;
|
||||
uint64_t button_timestamp = 0;
|
||||
uint64_t indicator_timestamp = 0;
|
||||
|
||||
bool key_pressed = false;
|
||||
bool win_latched = false;
|
||||
/* End of keymap config ------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
set_key.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user