summaryrefslogtreecommitdiffstats
path: root/keyboards/ergodox_ez/keymaps
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2021-07-27 10:11:52 +1000
committerNick Brassel <nick@tzarc.org>2021-07-27 10:11:52 +1000
commit394272a2663692081ce6f5b74f6f761090111ad0 (patch)
tree7971135837ced00c1628d26c3cf3d3156a1403ca /keyboards/ergodox_ez/keymaps
parente0375c0b710c075780e7ffe1afe4c39fccd96929 (diff)
parentb1c5a53a68ca8a304e7739467f2793c223853f68 (diff)
Merge remote-tracking branch 'upstream/master' into develop
Diffstat (limited to 'keyboards/ergodox_ez/keymaps')
-rw-r--r--keyboards/ergodox_ez/keymaps/default/keymap.c156
1 files changed, 76 insertions, 80 deletions
diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c
index 9079e48fcb..3c0ef320a4 100644
--- a/keyboards/ergodox_ez/keymaps/default/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/default/keymap.c
@@ -2,20 +2,20 @@
#include "version.h"
enum layers {
- BASE, // default layer
- SYMB, // symbols
+ BASE, // default layer
+ SYMB, // symbols
MDIA, // media keys
};
enum custom_keycodes {
#ifdef ORYX_CONFIGURATOR
- VRSN = EZ_SAFE_RANGE,
+ VRSN = EZ_SAFE_RANGE,
#else
- VRSN = SAFE_RANGE,
+ VRSN = SAFE_RANGE,
#endif
- RGB_SLD
};
+// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
@@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS,
- RGB_MOD, KC_TRNS, RGB_TOG, RGB_SLD,
+ RGB_MOD, KC_TRNS, RGB_TOG, RGB_M_P,
KC_TRNS, KC_TRNS,
RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI
),
@@ -115,94 +115,90 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK
),
};
+// clang-format on
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- if (record->event.pressed) {
- switch (keycode) {
- case VRSN:
- SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
- return false;
- #ifdef RGBLIGHT_ENABLE
- case RGB_SLD:
- rgblight_mode(1);
- return false;
- #endif
+ if (record->event.pressed) {
+ switch (keycode) {
+ case VRSN:
+ SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
+ return false;
+ }
}
- }
- return true;
+ return true;
}
// Runs just one time when the keyboard initializes.
void keyboard_post_init_user(void) {
#ifdef RGBLIGHT_COLOR_LAYER_0
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
#endif
};
// Runs whenever there is a layer state change.
layer_state_t layer_state_set_user(layer_state_t state) {
- ergodox_board_led_off();
- ergodox_right_led_1_off();
- ergodox_right_led_2_off();
- ergodox_right_led_3_off();
+ ergodox_board_led_off();
+ ergodox_right_led_1_off();
+ ergodox_right_led_2_off();
+ ergodox_right_led_3_off();
- uint8_t layer = get_highest_layer(state);
- switch (layer) {
- case 0:
- #ifdef RGBLIGHT_COLOR_LAYER_0
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
- #endif
- break;
- case 1:
- ergodox_right_led_1_on();
- #ifdef RGBLIGHT_COLOR_LAYER_1
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
- #endif
- break;
- case 2:
- ergodox_right_led_2_on();
- #ifdef RGBLIGHT_COLOR_LAYER_2
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
- #endif
- break;
- case 3:
- ergodox_right_led_3_on();
- #ifdef RGBLIGHT_COLOR_LAYER_3
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
- #endif
- break;
- case 4:
- ergodox_right_led_1_on();
- ergodox_right_led_2_on();
- #ifdef RGBLIGHT_COLOR_LAYER_4
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
- #endif
- break;
- case 5:
- ergodox_right_led_1_on();
- ergodox_right_led_3_on();
- #ifdef RGBLIGHT_COLOR_LAYER_5
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
- #endif
- break;
- case 6:
- ergodox_right_led_2_on();
- ergodox_right_led_3_on();
- #ifdef RGBLIGHT_COLOR_LAYER_6
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
- #endif
- break;
- case 7:
- ergodox_right_led_1_on();
- ergodox_right_led_2_on();
- ergodox_right_led_3_on();
- #ifdef RGBLIGHT_COLOR_LAYER_7
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7);
- #endif
- break;
- default:
- break;
+ uint8_t layer = get_highest_layer(state);
+ switch (layer) {
+ case 0:
+#ifdef RGBLIGHT_COLOR_LAYER_0
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
+#endif
+ break;
+ case 1:
+ ergodox_right_led_1_on();
+#ifdef RGBLIGHT_COLOR_LAYER_1
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
+#endif
+ break;
+ case 2:
+ ergodox_right_led_2_on();
+#ifdef RGBLIGHT_COLOR_LAYER_2
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
+#endif
+ break;
+ case 3:
+ ergodox_right_led_3_on();
+#ifdef RGBLIGHT_COLOR_LAYER_3
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
+#endif
+ break;
+ case 4:
+ ergodox_right_led_1_on();
+ ergodox_right_led_2_on();
+#ifdef RGBLIGHT_COLOR_LAYER_4
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
+#endif
+ break;
+ case 5:
+ ergodox_right_led_1_on();
+ ergodox_right_led_3_on();
+#ifdef RGBLIGHT_COLOR_LAYER_5
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
+#endif
+ break;
+ case 6:
+ ergodox_right_led_2_on();
+ ergodox_right_led_3_on();
+#ifdef RGBLIGHT_COLOR_LAYER_6
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
+#endif
+ break;
+ case 7:
+ ergodox_right_led_1_on();
+ ergodox_right_led_2_on();
+ ergodox_right_led_3_on();
+#ifdef RGBLIGHT_COLOR_LAYER_7
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7);
+#endif
+ break;
+ default:
+ break;
}
- return state;
+ return state;
};