Added enum for layer indexing

master
Mark 2022-02-06 19:47:30 -08:00
parent 4ffedb8368
commit 5a545a83e6
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 45 additions and 34 deletions

View File

@ -21,43 +21,54 @@ enum tap_dance_codes {
};
#define LAYER_MAIN_IDX 0
#define LAYER_COLEMAK_IDX 1
#define LAYER_NUMPAD_IDX 2
#define LAYER_SYMBOLS_IDX 3
#define LAYER_ARROWS_IDX 4
#define LAYER_FKEYS_IDX 5
#define LAYER_NAVIGATE_IDX 6
#define LAYER_DESKTOP_IDX 7
#define LAYER_KEYBOARD_IDX 8
#define LAYER_RUSSIAN_IDX 9
#define LAYER_RUSSIAN_SYMBOLS_IDX 10
// Assemble key and LED maps
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYER_MAIN,
[1] = LAYER_COLEMAK,
[2] = LAYER_NUMPAD,
[3] = LAYER_SYMBOLS,
[4] = LAYER_ARROWS,
[5] = LAYER_FKEYS,
[6] = LAYER_NAVIGATE,
[7] = LAYER_DESKTOP,
[8] = LAYER_KEYBOARD,
[9] = LAYER_RUSSIAN,
[10] = LAYER_RUSSIAN_SYMBOLS,
enum layer_indices {
LAYER_MAIN_IDX,
LAYER_COLEMAK_IDX,
LAYER_NUMPAD_IDX,
LAYER_SYMBOLS_IDX,
LAYER_ARROWS_IDX,
LAYER_FKEYS_IDX,
LAYER_NAVIGATE_IDX,
LAYER_DESKTOP_IDX,
LAYER_KEYBOARD_IDX,
LAYER_RUSSIAN_IDX,
LAYER_RUSSIAN_SYMBOLS_IDX,
};
enum led_map_indices {
LAYER_COLEMAK_LEDS_IDX,
LAYER_NUMPAD_LEDS_IDX,
LAYER_SYMBOLS_LEDS_IDX,
LAYER_ARROWS_LEDS_IDX,
LAYER_FKEYS_LEDS_IDX,
LAYER_NAVIGATE_LEDS_IDX,
LAYER_DESKTOP_LEDS_IDX,
LAYER_RUSSIAN_LEDS_IDX,
LAYER_RUSSIAN_SYMBOLS_LEDS_IDX,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_MAIN_IDX] = LAYER_MAIN,
[LAYER_COLEMAK_IDX] = LAYER_COLEMAK,
[LAYER_NUMPAD_IDX] = LAYER_NUMPAD,
[LAYER_SYMBOLS_IDX] = LAYER_SYMBOLS,
[LAYER_ARROWS_IDX] = LAYER_ARROWS,
[LAYER_FKEYS_IDX] = LAYER_FKEYS,
[LAYER_NAVIGATE_IDX] = LAYER_NAVIGATE,
[LAYER_DESKTOP_IDX] = LAYER_DESKTOP,
[LAYER_KEYBOARD_IDX] = LAYER_KEYBOARD,
[LAYER_RUSSIAN_IDX] = LAYER_RUSSIAN,
[LAYER_RUSSIAN_SYMBOLS_IDX] = LAYER_RUSSIAN_SYMBOLS,
};
const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = {
[1] = LAYER_COLEMAK_LEDS,
[2] = LAYER_NUMPAD_LEDS,
[3] = LAYER_SYMBOLS_LEDS,
[4] = LAYER_ARROWS_LEDS,
[5] = LAYER_FKEYS_LEDS,
[6] = LAYER_NAVIGATE_LEDS,
[7] = LAYER_DESKTOP_LEDS,
[9] = LAYER_RUSSIAN_LEDS,
[10] = LAYER_RUSSIAN_SYMBOLS_LEDS
[LAYER_COLEMAK_LEDS_IDX] = LAYER_COLEMAK_LEDS,
[LAYER_NUMPAD_LEDS_IDX] = LAYER_NUMPAD_LEDS,
[LAYER_SYMBOLS_LEDS_IDX] = LAYER_SYMBOLS_LEDS,
[LAYER_ARROWS_LEDS_IDX] = LAYER_ARROWS_LEDS,
[LAYER_FKEYS_LEDS_IDX] = LAYER_FKEYS_LEDS,
[LAYER_NAVIGATE_LEDS_IDX] = LAYER_NAVIGATE_LEDS,
[LAYER_DESKTOP_LEDS_IDX] = LAYER_DESKTOP_LEDS,
[LAYER_RUSSIAN_LEDS_IDX] = LAYER_RUSSIAN_LEDS,
[LAYER_RUSSIAN_SYMBOLS_LEDS_IDX] = LAYER_RUSSIAN_SYMBOLS_LEDS
};