From a0fed0ea176d1c986e40fc4981b900509c90d66e Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 21 May 2021 23:17:32 -0700 Subject: Convert Encoder callbacks to be boolean functions (#12805) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/gmmk/pro/keymaps/default/keymap.c | 3 ++- keyboards/gmmk/pro/keymaps/via/keymap.c | 5 +++-- keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'keyboards/gmmk/pro/keymaps') diff --git a/keyboards/gmmk/pro/keymaps/default/keymap.c b/keyboards/gmmk/pro/keymaps/default/keymap.c index 9e5796ac18..b08400cd8d 100644 --- a/keyboards/gmmk/pro/keymaps/default/keymap.c +++ b/keyboards/gmmk/pro/keymaps/default/keymap.c @@ -55,10 +55,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } + return true; } diff --git a/keyboards/gmmk/pro/keymaps/via/keymap.c b/keyboards/gmmk/pro/keymaps/via/keymap.c index 927bf8fdf2..940cc1c1f3 100644 --- a/keyboards/gmmk/pro/keymaps/via/keymap.c +++ b/keyboards/gmmk/pro/keymaps/via/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - + [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -65,10 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } + return true; } diff --git a/keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c b/keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c index 90fdec73b7..fded532562 100644 --- a/keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c +++ b/keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c @@ -47,10 +47,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_MS_WH_RIGHT); } else { tap_code(KC_MS_WH_LEFT); } + return true; } -- cgit v1.2.3