diff options
author | Drashna Jaelre <drashna@live.com> | 2021-05-21 23:17:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 23:17:32 -0700 |
commit | a0fed0ea176d1c986e40fc4981b900509c90d66e (patch) | |
tree | ee12f5943046015ea0dce8e2a30a68bc8eb99dbe /keyboards/rart/rart4x4 | |
parent | 76c23b15abc824f867b48d8d5100dced2417d336 (diff) |
Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Diffstat (limited to 'keyboards/rart/rart4x4')
-rw-r--r-- | keyboards/rart/rart4x4/keymaps/default/keymap.c | 11 | ||||
-rw-r--r-- | keyboards/rart/rart4x4/keymaps/via/keymap.c | 15 |
2 files changed, 14 insertions, 12 deletions
diff --git a/keyboards/rart/rart4x4/keymaps/default/keymap.c b/keyboards/rart/rart4x4/keymaps/default/keymap.c index 36680e357b..02dfc0a148 100644 --- a/keyboards/rart/rart4x4/keymaps/default/keymap.c +++ b/keyboards/rart/rart4x4/keymaps/default/keymap.c @@ -25,16 +25,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P4, KC_P5, KC_P6, KC_PPLS, KC_P1, KC_P2, KC_P3, KC_PENT ), - + [1] = LAYOUT_ortho_4x4( - KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, - RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV, - RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY, + KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, + RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV, + RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY, KC_COPY, KC_PSTE, KC_MYCM, RGB_TOG ) }; -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_VOLD); @@ -48,4 +48,5 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_WH_U); } } + return true; } diff --git a/keyboards/rart/rart4x4/keymaps/via/keymap.c b/keyboards/rart/rart4x4/keymaps/via/keymap.c index 9407b5f332..86e5538073 100644 --- a/keyboards/rart/rart4x4/keymaps/via/keymap.c +++ b/keyboards/rart/rart4x4/keymaps/via/keymap.c @@ -21,21 +21,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P4, KC_P5, KC_P6, KC_PPLS, KC_P1, KC_P2, KC_P3, KC_PMNS ), - + [1] = LAYOUT_ortho_4x4( - KC_TRNS, RGB_HUI, RGB_HUD, RESET, - RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV, - RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY, + KC_TRNS, RGB_HUI, RGB_HUD, RESET, + RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV, + RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY, KC_COPY, KC_PSTE, KC_MYCM, RGB_TOG ), - + [2] = LAYOUT_ortho_4x4( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - + [3] = LAYOUT_ortho_4x4( _______, _______, _______, _______, _______, _______, _______, _______, @@ -44,7 +44,7 @@ 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 (index == 0) { /* First encoder */ if (clockwise) { tap_code(KC_WH_U); @@ -58,4 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_VOLD); } } + return true; } |