QMK/keyboards/betalupi_ergodox/keymaps/default/layers/definitions/symbols.h

110 lines
4.1 KiB
C

// Layers are defined in macros,
// so that all supporting code can be
// auto-generated by the preprocessor.
//
// When making a new layer, make sure you update EVERY
// reference to BETA_LAYER() with your layer's name!
// This macro isn't used anywhere else.
// It's here for convenience, so we only have to write
// the layer name in one place.
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(SYMBOLS)
// If BETA_LAYER_NAME is defined, the preprocessor is making
// enums for this layer. See keymap.h.
//
// IMPORTANT:
// Things will break if BETA_LAYER_MAGIC_MACRO is written outside #ifdef/#endif guards.
// If BETA_LAYER_KEYS is defined, the preprocessor is either...
// - making LAYER_* enums (see keymap.h)
// - filling the keymap array (see keymap.c)
//
// Every layer must have this section.
#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_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,\
\
KC_NO, KC_NO,\
KC_NO,\
KC_NO, KC_NO, KC_NO,\
\
\
KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_NO, KC_NO, KC_NO,\
KC_NO, KC_LABK, KC_RABK, KC_SLASH, KC_NO, KC_BSLASH, KC_NO,\
KC_UNDS, KC_MINUS, KC_COLN, KC_TRANSPARENT, KC_PIPE, KC_NO,\
KC_NO, KC_EQUAL, KC_PLUS, KC_SCOLON, 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_NO\
)
// This is important.d
// The magic macro MUST be here, AFTER the keymap data.
BETA_LAYER_MAGIC_MACRO
#endif
// If BETA_LAYER_KEYS is defined, the preprocessor is either...
// - making LAYER_*_LEDS enums (see keymap.h)
// - filling the ledmap array (see keymap.c)
// - building the layer color switch statement (see keymap.c)
//
// This section is optional. If it is missing, this layer will not have
// an RGBMatrix color.
#ifdef BETA_LAYER_LEDS
#define BETA_LAYER_CONTEXT_DATA LEDS_ergodox(\
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
LC_ORANGE, LC_CYAN, LC_CYAN, LC_PINK, LC_CYAN, \
LC_ORANGE, LC_PINK, LC_PINK, LC_PINK, LC_PINK, \
LC_OFF, LC_CYAN, LC_CYAN, LC_PINK, LC_CYAN, \
LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
\
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
LC_GREEN, LC_GREEN, LC_CYAN, LC_OFF, LC_CYAN, \
LC_CYAN, LC_GREEN, LC_PINK, LC_ORANGE, LC_CYAN, \
LC_GREEN, LC_GREEN, LC_PINK, LC_OFF, LC_OFF, \
LC_OFF, LC_OFF, LC_OFF, LC_OFF \
)
// This is important.
// The magic macro MUST be here, AFTER the RGBMatrix data.
BETA_LAYER_MAGIC_MACRO
#endif
// If BETA_LAYER_INDICATORS is defined, the preprocessor is
// building the indicator led switch statement (see keymap.c)
//
// This should be a `case` statement that looks exactly like the following example.
//
// This section is optional. If it is missing, this layer will
// not set indicator leds.
/*
#ifdef BETA_LAYER_INDICATORS
case LAYER_MAGIC_MACRO:
ergodox_right_led_1_on();
//ergodox_right_led_2_on();
//ergodox_right_led_3_on();
break;
#endif
*/
// Cleanup.
// This is not optional,
// we MUST undef these here so the next layer
// we load can re-define them.
#undef BETA_LAYER_CONTEXT_DATA
#undef BETA_LAYER_MAGIC_MACRO