Added enum for layer indexing
parent
4ffedb8368
commit
5a545a83e6
|
@ -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
|
// Assemble key and LED maps
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
enum layer_indices {
|
||||||
[0] = LAYER_MAIN,
|
LAYER_MAIN_IDX,
|
||||||
[1] = LAYER_COLEMAK,
|
LAYER_COLEMAK_IDX,
|
||||||
[2] = LAYER_NUMPAD,
|
LAYER_NUMPAD_IDX,
|
||||||
[3] = LAYER_SYMBOLS,
|
LAYER_SYMBOLS_IDX,
|
||||||
[4] = LAYER_ARROWS,
|
LAYER_ARROWS_IDX,
|
||||||
[5] = LAYER_FKEYS,
|
LAYER_FKEYS_IDX,
|
||||||
[6] = LAYER_NAVIGATE,
|
LAYER_NAVIGATE_IDX,
|
||||||
[7] = LAYER_DESKTOP,
|
LAYER_DESKTOP_IDX,
|
||||||
[8] = LAYER_KEYBOARD,
|
LAYER_KEYBOARD_IDX,
|
||||||
[9] = LAYER_RUSSIAN,
|
LAYER_RUSSIAN_IDX,
|
||||||
[10] = LAYER_RUSSIAN_SYMBOLS,
|
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] = {
|
const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = {
|
||||||
[1] = LAYER_COLEMAK_LEDS,
|
[LAYER_COLEMAK_LEDS_IDX] = LAYER_COLEMAK_LEDS,
|
||||||
[2] = LAYER_NUMPAD_LEDS,
|
[LAYER_NUMPAD_LEDS_IDX] = LAYER_NUMPAD_LEDS,
|
||||||
[3] = LAYER_SYMBOLS_LEDS,
|
[LAYER_SYMBOLS_LEDS_IDX] = LAYER_SYMBOLS_LEDS,
|
||||||
[4] = LAYER_ARROWS_LEDS,
|
[LAYER_ARROWS_LEDS_IDX] = LAYER_ARROWS_LEDS,
|
||||||
[5] = LAYER_FKEYS_LEDS,
|
[LAYER_FKEYS_LEDS_IDX] = LAYER_FKEYS_LEDS,
|
||||||
[6] = LAYER_NAVIGATE_LEDS,
|
[LAYER_NAVIGATE_LEDS_IDX] = LAYER_NAVIGATE_LEDS,
|
||||||
[7] = LAYER_DESKTOP_LEDS,
|
[LAYER_DESKTOP_LEDS_IDX] = LAYER_DESKTOP_LEDS,
|
||||||
[9] = LAYER_RUSSIAN_LEDS,
|
[LAYER_RUSSIAN_LEDS_IDX] = LAYER_RUSSIAN_LEDS,
|
||||||
[10] = LAYER_RUSSIAN_SYMBOLS_LEDS
|
[LAYER_RUSSIAN_SYMBOLS_LEDS_IDX] = LAYER_RUSSIAN_SYMBOLS_LEDS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue