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/nullbitsco/scramble/keymaps/default/keymap.c | 3 ++- keyboards/nullbitsco/scramble/keymaps/oled/keymap.c | 3 ++- keyboards/nullbitsco/scramble/keymaps/via/keymap.c | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'keyboards/nullbitsco/scramble') diff --git a/keyboards/nullbitsco/scramble/keymaps/default/keymap.c b/keyboards/nullbitsco/scramble/keymaps/default/keymap.c index 2ccffe3d86..b80214110a 100644 --- a/keyboards/nullbitsco/scramble/keymaps/default/keymap.c +++ b/keyboards/nullbitsco/scramble/keymaps/default/keymap.c @@ -32,10 +32,11 @@ void matrix_init_user(void) { set_scramble_LED(LED_OFF); } -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/nullbitsco/scramble/keymaps/oled/keymap.c b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c index 7168ad9ec6..2081872ac2 100644 --- a/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c +++ b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c @@ -76,10 +76,11 @@ void matrix_init_user(void) { set_scramble_LED(LED_OFF); } -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/nullbitsco/scramble/keymaps/via/keymap.c b/keyboards/nullbitsco/scramble/keymaps/via/keymap.c index 91a448cc1a..d5b97855a5 100644 --- a/keyboards/nullbitsco/scramble/keymaps/via/keymap.c +++ b/keyboards/nullbitsco/scramble/keymaps/via/keymap.c @@ -52,10 +52,11 @@ void matrix_init_user(void) { set_scramble_LED(LED_OFF); } -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); - } -} \ No newline at end of file + } + return true; +} -- cgit v1.2.3