diff options
Diffstat (limited to 'keyboards/mechlovin/adelais/keymaps/via')
-rw-r--r-- | keyboards/mechlovin/adelais/keymaps/via/keymap.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/keyboards/mechlovin/adelais/keymaps/via/keymap.c b/keyboards/mechlovin/adelais/keymaps/via/keymap.c index 03636d02b3..d44a4e9382 100644 --- a/keyboards/mechlovin/adelais/keymaps/via/keymap.c +++ b/keyboards/mechlovin/adelais/keymaps/via/keymap.c @@ -41,4 +41,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -};
\ No newline at end of file +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_LEFT); + } else { + tap_code(KC_RGHT); + } + } + else if (index == 2) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + + #endif
\ No newline at end of file |