From 437d69ced25bd4cf1b4f281a5832cda958698a91 Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Wed, 23 Mar 2022 17:23:30 -0600 Subject: [PATCH 1/2] initial --- keyboards/gmmk/pro/pro.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/keyboards/gmmk/pro/pro.c b/keyboards/gmmk/pro/pro.c index 816d089a585d..b1887c6bb899 100644 --- a/keyboards/gmmk/pro/pro.c +++ b/keyboards/gmmk/pro/pro.c @@ -14,3 +14,15 @@ * along with this program. If not, see . */ #include "pro.h" + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) return false; + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + return false; +} +#endif From 83ddbfc83b2aecd3a01fd21375c2f0194d0aa04b Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Wed, 23 Mar 2022 18:49:39 -0600 Subject: [PATCH 2/2] formatting --- keyboards/gmmk/pro/pro.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/keyboards/gmmk/pro/pro.c b/keyboards/gmmk/pro/pro.c index b1887c6bb899..6aed1d6e189d 100644 --- a/keyboards/gmmk/pro/pro.c +++ b/keyboards/gmmk/pro/pro.c @@ -17,12 +17,14 @@ #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) return false; - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - return false; + if (!encoder_update_user(index, clockwise)) { + return false; + } + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + return false; } #endif