From 43b21cffe068f0591b9c9ecbf677a463a93747a7 Mon Sep 17 00:00:00 2001 From: ladbahuy <67696967+ladbahuy@users.noreply.github.com> Date: Wed, 22 Jul 2020 04:30:20 +0700 Subject: Update rartpad via keymap (#9747) --- keyboards/rart/rartpad/keymaps/via/keymap.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'keyboards/rart') 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); + } + } +} -- cgit v1.2.3