diff options
author | Joel Challis <git@zvecr.com> | 2022-05-31 03:08:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 03:08:56 +0100 |
commit | 0e11b511e4a3c48a67de6414b0907ec26dfcdf49 (patch) | |
tree | 786fe4fdaa248a9c92e17c27b508778eb77e815f /keyboards/ktec/ergodone/keymaps/default/keymap.c | |
parent | 2879573688e347fd448ac32a1621ba3bec97f5c5 (diff) |
Convert ergodone to use core mcp23018 driver (#17005)
Diffstat (limited to 'keyboards/ktec/ergodone/keymaps/default/keymap.c')
-rw-r--r-- | keyboards/ktec/ergodone/keymaps/default/keymap.c | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/keyboards/ktec/ergodone/keymaps/default/keymap.c b/keyboards/ktec/ergodone/keymaps/default/keymap.c index ca3da7ec5d..837af0fa03 100644 --- a/keyboards/ktec/ergodone/keymaps/default/keymap.c +++ b/keyboards/ktec/ergodone/keymaps/default/keymap.c @@ -6,10 +6,7 @@ #define MDIA 2 // media keys enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here - EPRM, - VRSN, - RGB_SLD + VRSN = SAFE_RANGE, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -67,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | EPRM | | | | | | | . | 0 | = | | + * | EE_CLR | | | | | | | . | 0 | = | | * `-----------------------------------' `----------------------------------' * ,-------------. ,-------------. * |Animat| | |Toggle|Solid | @@ -84,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, - EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + EE_CLR,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, RGB_MOD,KC_TRNS, KC_TRNS, RGB_VAD,RGB_VAI,KC_TRNS, @@ -94,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, - RGB_TOG, RGB_SLD, + RGB_TOG, RGB_M_P, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI ), @@ -143,41 +140,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - // dynamically generate these. - case EPRM: - if (record->event.pressed) { - eeconfig_init(); - } - return false; - break; case VRSN: if (record->event.pressed) { SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); } return false; - break; - case RGB_SLD: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_mode(1); - #endif - } - return false; - break; } return true; } +bool led_update_user(led_t led_state) { + // stub any kb level behaviour + return false; +} + // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (layer) { + + switch (get_highest_layer(layer_state)) { // TODO: Make this relevant to the ErgoDox EZ. case 1: ergodox_right_led_1_on(); |