aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/rart/rartpad/keymaps/via/keymap.c16
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] = {
34 _______, _______, _______, _______ 34 _______, _______, _______, _______
35 ) 35 )
36}; 36};
37
38void encoder_update_user(uint8_t index, bool clockwise) {
39 if (index == 0) { /* First encoder */
40 if (clockwise) {
41 tap_code(KC_WH_U);
42 } else {
43 tap_code(KC_WH_D);
44 }
45 } else if (index == 1) { /* Second encoder */
46 if (clockwise) {
47 tap_code(KC_VOLU);
48 } else {
49 tap_code(KC_VOLD);
50 }
51 }
52}