Added named layer index

master
Mark 2022-02-06 14:26:19 -08:00
parent 05adb5053f
commit c2005b5337
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
7 changed files with 52 additions and 26 deletions

View File

@ -21,11 +21,23 @@ 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_NUMBERS,
[2] = LAYER_NUMPAD,
[3] = LAYER_SYMBOLS,
[4] = LAYER_ARROWS,
[5] = LAYER_FKEYS,
@ -38,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = {
[1] = LAYER_COLEMAK_LEDS,
[2] = LAYER_NUMBERS_LEDS,
[2] = LAYER_NUMPAD_LEDS,
[3] = LAYER_SYMBOLS_LEDS,
[4] = LAYER_ARROWS_LEDS,
[5] = LAYER_FKEYS_LEDS,

View File

@ -2,7 +2,7 @@
#include "layers/main.h"
#include "layers/colemak.h"
#include "layers/numbers.h"
#include "layers/numpad.h"
#include "layers/symbols.h"
#include "layers/arrows.h"
#include "layers/fkeys.h"

View File

@ -1,15 +1,29 @@
#pragma once
#include "keymap.h"
#define LAYER_ARROWS LAYOUT_ergodox_pretty( \
KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
KC_TRANSPARENT, KC_LEFT, KC_RIGHT, KC_UP, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, LALT(KC_LCTRL), KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_PGDOWN, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,\
#define LAYER_ARROWS LAYOUT_ergodox( \
KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
KC_TRANSPARENT, KC_LEFT, KC_RIGHT, KC_UP, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, LALT(KC_LCTRL), KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO,\
KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,\
\
KC_TRANSPARENT, KC_TRANSPARENT, \
KC_TRANSPARENT,\
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,\
\
\
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
KC_TRANSPARENT, KC_NO, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_NO, KC_PGDOWN, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,\
\
KC_TRANSPARENT, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT\
KC_TRANSPARENT,\
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT\
)
#define LAYER_ARROWS_LEDS \
{ {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {85,203,158}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {85,203,158}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {85,203,158}, {32,176,255}, {32,176,255}, {0,0,0}, {85,203,158}, {85,203,158}, {85,203,158}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {243,222,234}, {0,0,0}, {0,0,0}, {0,0,0} }

View File

@ -6,7 +6,7 @@
KC_NO, KC_TRANSPARENT, LALT(LCTL(KC_UP)),KC_NO, LCTL(LGUI(KC_SPACE)),LGUI(KC_T), KC_NO, KC_NO, KC_NO, KC_NO, LCTL(LGUI(KC_UP)),KC_NO, LGUI(KC_P), KC_NO,\
KC_NO, LALT(LCTL(KC_LEFT)),LALT(LCTL(KC_DOWN)),LALT(LCTL(KC_RIGHT)),LGUI(KC_F), LGUI(KC_M), KC_NO, LCTL(LGUI(KC_LEFT)),LCTL(LGUI(KC_DOWN)),LCTL(LGUI(KC_RIGHT)),KC_NO, KC_NO,\
KC_NO, KC_NO, KC_NO, LGUI(LSFT(KC_C)),LGUI(KC_N), KC_NO, KC_NO, KC_NO, KC_NO, LGUI(KC_H), LGUI(KC_J), KC_NO, KC_NO, KC_NO,\
TO(0), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
TO(LAYER_MAIN_IDX), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
KC_NO, KC_NO, KC_MEDIA_PREV_TRACK,KC_MEDIA_NEXT_TRACK,\
KC_NO, KC_AUDIO_VOL_UP,\
LGUI(KC_ENTER), LGUI(KC_BSLASH),KC_NO, KC_AUDIO_VOL_DOWN,KC_MEDIA_STOP, KC_MEDIA_PLAY_PAUSE\

View File

@ -2,24 +2,24 @@
#include "keymap.h"
#define LAYER_MAIN LAYOUT_ergodox( \
KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, TG(2),\
KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, TG(LAYER_NUMPAD_IDX),\
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LGUI,\
KC_DELETE, KC_A, KC_S, KC_D, KC_F, KC_G,\
KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TRANSPARENT,\
OSL(7), OSL(5), KC_LALT, KC_LSHIFT, MO(4),\
OSL(LAYER_DESKTOP_IDX), OSL(LAYER_FKEYS_IDX), KC_LALT, KC_LSHIFT, MO(LAYER_ARROWS_IDX),\
\
KC_PSCREEN, LT(8,KC_NO),\
KC_PSCREEN, LT(LAYER_KEYBOARD_IDX,KC_NO),\
TD(DANCE_0),\
KC_SPACE, KC_BSPACE, LCTL(KC_BSPACE),\
\
\
LCTL(KC_LALT), KC_6, KC_7, KC_8, KC_9, KC_0, LGUI(KC_TAB),\
KC_TRANSPARENT, KC_Y, KC_U, KC_I, KC_O, KC_TRANSPARENT, TG(6),\
KC_H, KC_J, KC_K, MO(3), KC_L, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_Y, KC_U, KC_I, KC_O, KC_TRANSPARENT, TG(LAYER_NAVIGATE_IDX),\
KC_H, KC_J, KC_K, MO(LAYER_SYMBOLS_IDX), KC_L, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_N, KC_M, KC_P, KC_DOT, KC_COMMA, KC_TRANSPARENT,\
KC_RIGHT, KC_TRANSPARENT, KC_TRANSPARENT, OSL(5), KC_TRANSPARENT,\
KC_RIGHT, KC_TRANSPARENT, KC_TRANSPARENT, OSL(LAYER_FKEYS_IDX), KC_TRANSPARENT,\
\
LGUI(KC_SPACE), RU_LAYER,\
TG(1),\
TG(LAYER_COLEMAK_IDX),\
KC_DELETE, KC_RSHIFT, KC_ENTER\
)

View File

@ -3,10 +3,10 @@
#define LAYER_NAVIGATE LAYOUT_ergodox_pretty(\
KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
KC_TRANSPARENT, KC_NO, KC_MS_WH_UP, KC_MS_UP, KC_MS_WH_DOWN, KC_NO, KC_NO, TO(0), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_NO, KC_MS_WH_UP, KC_MS_UP, KC_MS_WH_DOWN, KC_NO, KC_NO, TO(LAYER_MAIN_IDX), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
TO(7), KC_NO, KC_NO, KC_TRANSPARENT, KC_MS_BTN3, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
TO(LAYER_DESKTOP_IDX), KC_NO, KC_NO, KC_TRANSPARENT, KC_MS_BTN3, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_NO, KC_TRANSPARENT,\
KC_MS_BTN1, KC_MS_BTN2, KC_NO, KC_NO, KC_LGUI, KC_TRANSPARENT\

View File

@ -1,7 +1,7 @@
#pragma once
#include "keymap.h"
#define LAYER_NUMBERS LAYOUT_ergodox_pretty(\
#define LAYER_NUMPAD LAYOUT_ergodox_pretty(\
KC_TRANSPARENT, KC_CIRC, KC_NO, KC_HASH, KC_DLR, KC_PERC, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_NO, KC_7, KC_8, KC_9, KC_ASTR, KC_SLASH, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_PLUS, KC_4, KC_5, KC_6, KC_0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
@ -11,5 +11,5 @@
KC_TRANSPARENT, KC_TRANSPARENT,\
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT \
)
#define LAYER_NUMBERS_LEDS \
#define LAYER_NUMPAD_LEDS \
{ {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {32,176,255}, {85,203,158}, {85,203,158}, {85,203,158}, {0,0,0}, {85,203,158}, {85,203,158}, {85,203,158}, {85,203,158}, {32,176,255}, {32,176,255}, {85,203,158}, {85,203,158}, {85,203,158}, {32,176,255}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0} }