From 900d9a5d1da317254f9e6c022e6c1d3a3a6d97fa Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 20 Jul 2022 19:09:10 -0700 Subject: [PATCH] Fixed layer order --- .../default/layers/definitions/arrows.h | 1 - .../default/layers/definitions/layers.inc | 20 +++++++++++++++++-- .../keymaps/default/layers/definitions/main.h | 4 ++-- .../default/layers/definitions/russian.h | 6 +++--- .../default/layers/definitions/symbols_ru.h | 1 - .../keymaps/default/layers/layers.c | 2 -- .../keymaps/default/layers/layers.h | 4 ++++ 7 files changed, 27 insertions(+), 11 deletions(-) diff --git a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/arrows.h b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/arrows.h index 0fa7d01..98fca86 100644 --- a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/arrows.h +++ b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/arrows.h @@ -2,7 +2,6 @@ #define BETA_LAYER_MAGIC_MACRO BETA_LAYER(ARROWS) - #ifdef BETA_LAYER_KEYS #define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\ KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\ diff --git a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/layers.inc b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/layers.inc index 2896984..50dfa0e 100644 --- a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/layers.inc +++ b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/layers.inc @@ -1,9 +1,25 @@ +// ORDER MATTERS! +// Don't forget how QMK layers work... +// +// Learned that the hard way. + + +// First layer will be "default" layer in QMK. +// Second will have index 1, etc. See layers.h + + +// These MUST be first, since they activate other layers. #include "main.h" +#include "russian.h" + +// The order of these doesn't really matter, +// since only one will be active at a time. #include "symbols.h" +#include "symbols_ru.h" + #include "arrows.h" #include "desktop.h" #include "fkeys.h" #include "keyboard.h" #include "numpad.h" -#include "russian.h" -#include "symbols_ru.h" \ No newline at end of file + diff --git a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/main.h b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/main.h index 69d96ee..4f45084 100644 --- a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/main.h +++ b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/main.h @@ -21,8 +21,8 @@ KC_NO, KC_N, KC_M, KC_P, KC_DOT, KC_COMMA, TT(LAYER_FKEYS),\ KC_RIGHT, KC_NO, TO(LAYER_KEYBOARD), TO(LAYER_RUSSIAN), LGUI(KC_SPACE),\ \ - KC_NO, KC_NO,\ - KC_NO,\ + KC_LNG1, KC_LNG2,\ + KC_LNG3,\ KC_NO, KC_RSHIFT, KC_ENTER\ ) diff --git a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/russian.h b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/russian.h index b9c82f7..9c044bb 100644 --- a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/russian.h +++ b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/russian.h @@ -8,7 +8,7 @@ KC_TRANSPARENT, RU_CHE, RU_SHA, RU_IE, RU_ER, RU_TE, RU_YO,\ KC_TRANSPARENT, RU_A, RU_ES, RU_DE, RU_EF, RU_GHE,\ M_RU_CTRL, RU_ZE, RU_YA, RU_TSE, RU_VE, RU_BE, RU_E,\ - KC_TRANSPARENT, KC_TRANSPARENT, M_RU_ALT, KC_TRANSPARENT, KC_TRANSPARENT,\ + KC_TRANSPARENT, KC_TRANSPARENT, M_RU_ALT, KC_TRANSPARENT, MO(LAYER_ARROWS),\ \ KC_TRANSPARENT, KC_TRANSPARENT,\ KC_TRANSPARENT,\ @@ -17,9 +17,9 @@ \ KC_NO, RU_6, RU_7, RU_8, RU_9, RU_0, KC_TRANSPARENT,\ RU_SOFT, RU_U, RU_YU, RU_I, RU_O, RU_SHCH, KC_NO,\ - RU_HA, RU_ZHE, RU_KA, MO(LAYER_SYMBOLS_RU), RU_EL, KC_NO,\ + RU_HA, RU_ZHE, RU_KA, MO(LAYER_SYMBOLS_RU), RU_EL, KC_NO,\ RU_HARD, RU_EN, RU_EM, RU_PE, RU_YERU, RU_SHTI, KC_TRANSPARENT,\ - KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, TO(LAYER_MAIN), KC_TRANSPARENT,\ + KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, TO(LAYER_MAIN), KC_TRANSPARENT,\ \ KC_TRANSPARENT, KC_TRANSPARENT,\ KC_TRANSPARENT,\ diff --git a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/symbols_ru.h b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/symbols_ru.h index 4d351d9..1a9dba4 100644 --- a/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/symbols_ru.h +++ b/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/symbols_ru.h @@ -2,7 +2,6 @@ #define BETA_LAYER_MAGIC_MACRO BETA_LAYER(SYMBOLS_RU) - #ifdef BETA_LAYER_KEYS #define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\ KC_NO, RU_EXLM, RU_DQUO, RU_NUM, RU_SCLN, RU_PERC, KC_NO,\ diff --git a/keyboards/betalupi_ergodox/keymaps/default/layers/layers.c b/keyboards/betalupi_ergodox/keymaps/default/layers/layers.c index fbb4da6..c36634a 100644 --- a/keyboards/betalupi_ergodox/keymaps/default/layers/layers.c +++ b/keyboards/betalupi_ergodox/keymaps/default/layers/layers.c @@ -1,4 +1,3 @@ -#include "keymap.h" #include "layers.h" @@ -12,7 +11,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #undef BETA_LAYER_KEYS - // Create led map array #define BETA_LAYER_LEDS #define BETA_LAYER(name) [LAYER_##name##_LEDS] = BETA_LAYER_CONTEXT_DATA, diff --git a/keyboards/betalupi_ergodox/keymaps/default/layers/layers.h b/keyboards/betalupi_ergodox/keymaps/default/layers/layers.h index c6b1359..d9956fd 100644 --- a/keyboards/betalupi_ergodox/keymaps/default/layers/layers.h +++ b/keyboards/betalupi_ergodox/keymaps/default/layers/layers.h @@ -1,3 +1,7 @@ +#pragma once +// This header declares custom keycodes +#include "keymap.h" + #define LAYER_INCLUDE_FILE "definitions/layers.inc" // Generate layer ids