@ -2,6 +2,7 @@
|
||||
#include "layers/layers.h"
|
||||
|
||||
#include "spellcheck.h"
|
||||
#include "rawhid.h"
|
||||
|
||||
// Values that should not be saved to git.
|
||||
// Create a `secrets.h` in the keymap directory.
|
||||
@ -37,6 +38,14 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
set_layer_colors(state);
|
||||
|
||||
//uint8_t layer = biton32(state);
|
||||
return state;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Return FALSE to halt key processing,
|
||||
// Return TRUE to allow QMK to handle keypress.
|
||||
|
@ -22,8 +22,16 @@ extern rgb_config_t rgb_matrix_config;
|
||||
#define LC_RU_G LC_HSV(153, 255, 153)
|
||||
#define LC_RU_K LC_HSV( 0, 255, 145)
|
||||
|
||||
// Language keymap ids for layers.
|
||||
// See layers/definitions/symbols.h.
|
||||
enum layer_layout_ids {
|
||||
LAYOUT_NULL, // This layer doesn't care what keymap the OS is using
|
||||
LAYOUT_EN, // This layer is designed for the standard keymapping
|
||||
LAYOUT_RU,
|
||||
};
|
||||
|
||||
// Define custom keys
|
||||
// (Must be done BEFORE keymaps)
|
||||
// (Must be done before keymaps are loaded)
|
||||
enum custom_keycodes {
|
||||
M_SHUTDOWN = BETA_SAFE_RANGE,
|
||||
M_RESETWM,
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(ARROWS)
|
||||
|
||||
#ifdef BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_NULL
|
||||
BETA_LAYER_MAGIC_MACRO
|
||||
#endif
|
||||
|
||||
#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,\
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(DESKTOP)
|
||||
|
||||
#ifdef BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_EN
|
||||
BETA_LAYER_MAGIC_MACRO
|
||||
#endif
|
||||
|
||||
#ifdef BETA_LAYER_KEYS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||
KC_TRANSPARENT, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), TO(LAYER_MAIN),\
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(FKEYS)
|
||||
|
||||
#ifdef BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_NULL
|
||||
BETA_LAYER_MAGIC_MACRO
|
||||
#endif
|
||||
|
||||
#ifdef BETA_LAYER_KEYS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||
KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO,\
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(KEYBOARD)
|
||||
|
||||
#ifdef BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_EN
|
||||
BETA_LAYER_MAGIC_MACRO
|
||||
#endif
|
||||
|
||||
#ifdef BETA_LAYER_KEYS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||
RGB_TOG, RGB_HUD, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(MAIN)
|
||||
|
||||
#ifdef BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_EN
|
||||
BETA_LAYER_MAGIC_MACRO
|
||||
#endif
|
||||
|
||||
#ifdef BETA_LAYER_KEYS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||
KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(LAYER_DESKTOP),\
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(NUMPAD)
|
||||
|
||||
#ifdef BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_EN
|
||||
BETA_LAYER_MAGIC_MACRO
|
||||
#endif
|
||||
|
||||
#ifdef BETA_LAYER_KEYS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||
KC_TRANSPARENT, KC_CIRC, KC_NO, KC_HASH, KC_DLR, KC_PERC, KC_NO,\
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(RUSSIAN)
|
||||
|
||||
#ifdef BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_RU
|
||||
BETA_LAYER_MAGIC_MACRO
|
||||
#endif
|
||||
|
||||
#ifdef BETA_LAYER_KEYS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||
KC_TRANSPARENT, RU_1, RU_2, RU_3, RU_4, RU_5, KC_TRANSPARENT,\
|
||||
|
@ -13,6 +13,15 @@
|
||||
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(SYMBOLS)
|
||||
|
||||
|
||||
// What OS keyboard layout this layer is designed for.
|
||||
// See keymap.h for possible values.
|
||||
//
|
||||
// Every layer must have this section.
|
||||
#ifdef BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_EN
|
||||
BETA_LAYER_MAGIC_MACRO
|
||||
#endif
|
||||
|
||||
|
||||
// If BETA_LAYER_NAME is defined, the preprocessor is making
|
||||
// enums for this layer. See keymap.h.
|
||||
@ -28,7 +37,7 @@
|
||||
#ifdef BETA_LAYER_KEYS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||
KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO,\
|
||||
KC_NO, KC_GRAVE, KC_LPRN, KC_RPRN, KC_QUES, KC_LCBR, KC_NO,\
|
||||
KC_NO, KC_GRAVE, KC_LPRN, KC_RPRN, KC_QUES, KC_LCBR, KC_TRNS,\
|
||||
KC_NO, KC_TILD, KC_QUOTE, KC_COMMA, KC_DOT, KC_DQUO,\
|
||||
KC_NO, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_EXLM, KC_RCBR, KC_NO,\
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(SYMBOLS_RU)
|
||||
|
||||
#ifdef BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_RU
|
||||
BETA_LAYER_MAGIC_MACRO
|
||||
#endif
|
||||
|
||||
#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,\
|
||||
|
@ -20,6 +20,14 @@ const uint8_t PROGMEM ledmaps[][DRIVER_LED_TOTAL][3] = {
|
||||
#undef BETA_LAYER
|
||||
#undef BETA_LAYER_LEDS
|
||||
|
||||
// Create os layout array
|
||||
#define BETA_LAYER_LAYOUTS
|
||||
#define BETA_LAYER(name) [LAYER_##name] = BETA_LAYER_CONTEXT_DATA,
|
||||
uint8_t layer_layouts[] = {
|
||||
#include LAYER_INCLUDE_FILE
|
||||
};
|
||||
#undef BETA_LAYER
|
||||
#undef BETA_LAYER_LAYOUTS
|
||||
|
||||
|
||||
void set_layer_color(int layer) {
|
||||
@ -70,7 +78,7 @@ void rgb_matrix_indicators_user(void) {
|
||||
|
||||
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
uint32_t set_layer_colors(uint32_t state) {
|
||||
|
||||
uint8_t layer = biton32(state);
|
||||
|
||||
|
@ -33,8 +33,9 @@ enum led_indices {
|
||||
//const uint16_t PROGMEM keymaps[X_LAYER_MAX][MATRIX_ROWS][MATRIX_COLS];
|
||||
//const uint8_t PROGMEM ledmaps[X_LAYER_LEDS_MAX][DRIVER_LED_TOTAL][3];
|
||||
|
||||
extern uint8_t layer_layouts[];
|
||||
|
||||
void set_layer_color(int layer);
|
||||
void rgb_matrix_indicators_user(void);
|
||||
uint32_t layer_state_set_user(uint32_t state);
|
||||
uint32_t set_layer_colors(uint32_t state);
|
||||
|
||||
|
Reference in New Issue
Block a user