summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorladbahuy <67696967+ladbahuy@users.noreply.github.com>2020-07-22 04:30:20 +0700
committerGitHub <noreply@github.com>2020-07-21 22:30:20 +0100
commit43b21cffe068f0591b9c9ecbf677a463a93747a7 (patch)
treeccbaccc06c4fcf0ec83cbf965f4c77bb6e42ab31
parent58c31f563236bb594b17c07b382ee51d3315237a (diff)
Update rartpad via keymap (#9747)
-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 121eacca16..986ba68137 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);
+ }
+ }
+}