Explorar o código

Update rartpad via keymap (#9747)

ladbahuy %!s(int64=4) %!d(string=hai) anos
pai
achega
43b21cffe0
Modificáronse 1 ficheiros con 16 adicións e 0 borrados
  1. 16 0
      keyboards/rart/rartpad/keymaps/via/keymap.c

+ 16 - 0
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);
+        }
+    }
+}