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/10bleoledhub/keymaps/via/keymap.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'keyboards/10bleoledhub/keymaps/via/keymap.c') diff --git a/keyboards/10bleoledhub/keymaps/via/keymap.c b/keyboards/10bleoledhub/keymaps/via/keymap.c index d7e986acfc..6f78ac8af0 100644 --- a/keyboards/10bleoledhub/keymaps/via/keymap.c +++ b/keyboards/10bleoledhub/keymaps/via/keymap.c @@ -9,11 +9,11 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see .*/ +along with this program. If not, see .*/ /* Keymap _0: (Base Layer) Default Layer * .-----. - * |PGUP | + * |PGUP | * |-----------------. * | 7 | 8 | 9 | * |-----|-----|-----| @@ -37,12 +37,12 @@ along with this program. If not, see .*/ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( + [0] = LAYOUT( KC_PGUP, - KC_KP_7, KC_KP_8, MO(1), + KC_KP_7, KC_KP_8, MO(1), KC_P4, KC_P5, KC_P6, KC_P1, KC_P2, KC_P3), - [1] = LAYOUT( + [1] = LAYOUT( KC_NUMLOCK, RGB_TOG, RGB_MOD, RGB_M_K, RGB_SAI, RGB_SAD, RGB_HUI, @@ -58,14 +58,15 @@ static void render_logo(void) { void oled_task_user(void) { render_logo(); } #endif -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { /* First encoder */ if (clockwise) { tap_code(KC_PGDN); } else { tap_code(KC_PGUP); } - } + } + return true; } -- cgit v1.2.3