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/0xcb/1337/keymaps/default/keymap.c | 3 ++- keyboards/0xcb/1337/keymaps/jakob/keymap.c | 3 ++- keyboards/0xcb/1337/keymaps/via/keymap.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'keyboards/0xcb') diff --git a/keyboards/0xcb/1337/keymaps/default/keymap.c b/keyboards/0xcb/1337/keymaps/default/keymap.c index 5089117d8d..596ffabcc7 100644 --- a/keyboards/0xcb/1337/keymaps/default/keymap.c +++ b/keyboards/0xcb/1337/keymaps/default/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* rotary encoder (SW3) - add more else if blocks for more granular layer control */ #ifdef ENCODER_ENABLE -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (IS_LAYER_ON(_RGB)) { #ifdef RGBLIGHT_ENABLE if (clockwise) { @@ -72,6 +72,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_VOLD); } } + return true; } #endif diff --git a/keyboards/0xcb/1337/keymaps/jakob/keymap.c b/keyboards/0xcb/1337/keymaps/jakob/keymap.c index dc5ba60251..14427ee6d8 100644 --- a/keyboards/0xcb/1337/keymaps/jakob/keymap.c +++ b/keyboards/0xcb/1337/keymaps/jakob/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* rotary encoder (SW3) - add more else if blocks for more granular layer control */ #ifdef ENCODER_ENABLE -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (IS_LAYER_ON(_RGB)) { #ifdef RGBLIGHT_ENABLE if (clockwise) { @@ -72,6 +72,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code16(C(A(KC_DOWN))); } } + return true; } #endif diff --git a/keyboards/0xcb/1337/keymaps/via/keymap.c b/keyboards/0xcb/1337/keymaps/via/keymap.c index 5089117d8d..596ffabcc7 100644 --- a/keyboards/0xcb/1337/keymaps/via/keymap.c +++ b/keyboards/0xcb/1337/keymaps/via/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* rotary encoder (SW3) - add more else if blocks for more granular layer control */ #ifdef ENCODER_ENABLE -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (IS_LAYER_ON(_RGB)) { #ifdef RGBLIGHT_ENABLE if (clockwise) { @@ -72,6 +72,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_VOLD); } } + return true; } #endif -- cgit v1.2.1