From 5315aefe0ac14bcd8b7505bd503a4aa16a239206 Mon Sep 17 00:00:00 2001 From: Samuel Colburn Date: Mon, 25 Oct 2021 10:34:32 -0400 Subject: [PATCH] Adjust gmmk/pro/ansi vial keymap for full rotary knob support --- keyboards/gmmk/pro/ansi/keymaps/vial/keymap.c | 28 +++++++++++-------- keyboards/gmmk/pro/ansi/keymaps/vial/rules.mk | 1 + 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/keyboards/gmmk/pro/ansi/keymaps/vial/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/vial/keymap.c index 65ccaf88f2..a061a85e40 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/vial/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/vial/keymap.c @@ -56,17 +56,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; // clang-format on - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - return true; -} -#endif // ENCODER_ENABLE diff --git a/keyboards/gmmk/pro/ansi/keymaps/vial/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/vial/rules.mk index c10a0b2f62..d9ae765ea5 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/vial/rules.mk +++ b/keyboards/gmmk/pro/ansi/keymaps/vial/rules.mk @@ -2,6 +2,7 @@ VIA_ENABLE=yes VIAL_ENABLE=yes VIALRGB_ENABLE=yes +VIAL_ENCODERS_ENABLE = yes #define VIAL_UNLOCK_ROWS { 1,3 } #define VIAL_UNLOCK_COLS { 10,4 }