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

112 lines
3.7 KiB
C
Raw Permalink Normal View History

2023-12-31 10:28:51 -08:00
// 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)
// What OS keyboard layout this layer is designed for.
// See extra_mappings.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.
//
// 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_voyager(\
KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC,\
KC_NO, KC_GRAVE, KC_LPRN, KC_RPRN, KC_QUES, KC_LCBR,\
KC_NO, KC_TILD, KC_QUOT, KC_COMMA, KC_DOT, KC_DQUO,\
KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_EXLM, KC_RCBR,\
\
KC_NO, KC_NO,\
\
\
KC_CIRC, KC_AMPR, KC_ASTR, KC_NO, KC_NO, KC_NO,\
KC_LABK, KC_RABK, KC_SLASH, KC_NO, KC_BSLS, KC_NO,\
KC_UNDS, KC_MINUS, KC_COLN, KC_TRANSPARENT, KC_PIPE, KC_NO,\
KC_EQUAL, KC_PLUS, KC_SCLN, 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 {\
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
LC_OFF, LC_ORN, LC_CYN, LC_CYN, LC_PNK, LC_CYN, \
LC_OFF, LC_ORN, LC_PNK, LC_PNK, LC_PNK, LC_PNK, \
LC_OFF, LC_OFF, LC_CYN, LC_CYN, LC_PNK, LC_CYN, \
LC_OFF, LC_OFF, \
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
LC_GRN, LC_GRN, LC_CYN, LC_OFF, LC_CYN, LC_OFF, \
LC_CYN, LC_GRN, LC_PNK, LC_RED, LC_CYN, LC_OFF, \
LC_GRN, LC_GRN, LC_PNK, 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