diff options
author | ladbahuy <67696967+ladbahuy@users.noreply.github.com> | 2020-07-22 04:30:20 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-21 22:30:20 +0100 |
commit | 43b21cffe068f0591b9c9ecbf677a463a93747a7 (patch) | |
tree | ccbaccc06c4fcf0ec83cbf965f4c77bb6e42ab31 /keyboards/rart | |
parent | 58c31f563236bb594b17c07b382ee51d3315237a (diff) | |
download | qmk_firmware-43b21cffe068f0591b9c9ecbf677a463a93747a7.tar.gz |
Update rartpad via keymap (#9747)
Diffstat (limited to 'keyboards/rart')
-rw-r--r-- | keyboards/rart/rartpad/keymaps/via/keymap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/keyboards/rart/rartpad/keymaps/via/keymap.c b/keyboards/rart/rartpad/keymaps/via/keymap.c index 121eacca1..986ba6813 100644 --- a/keyboards/rart/rartpad/keymaps/via/keymap.c +++ b/keyboards/rart/rartpad/keymaps/via/keymap.c @@ -34,3 +34,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______ ) }; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_WH_U); + } else { + tap_code(KC_WH_D); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} |