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/basekeys | |
parent | 76c23b15abc824f867b48d8d5100dced2417d336 (diff) | |
download | qmk_firmware-a0fed0ea176d1c986e40fc4981b900509c90d66e.tar.gz qmk_firmware-a0fed0ea176d1c986e40fc4981b900509c90d66e.zip |
Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Diffstat (limited to 'keyboards/basekeys')
-rw-r--r-- | keyboards/basekeys/trifecta/keymaps/default/keymap.c | 3 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/keymaps/via/keymap.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/keyboards/basekeys/trifecta/keymaps/default/keymap.c b/keyboards/basekeys/trifecta/keymaps/default/keymap.c index 727ebf381..6db61e476 100644 --- a/keyboards/basekeys/trifecta/keymaps/default/keymap.c +++ b/keyboards/basekeys/trifecta/keymaps/default/keymap.c | |||
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
48 | ) | 48 | ) |
49 | }; | 49 | }; |
50 | 50 | ||
51 | void encoder_update_user(uint8_t index, bool clockwise) { | 51 | bool encoder_update_user(uint8_t index, bool clockwise) { |
52 | if (index == 0) { /* First encoder */ | 52 | if (index == 0) { /* First encoder */ |
53 | if (clockwise) { | 53 | if (clockwise) { |
54 | tap_code(KC_VOLU); | 54 | tap_code(KC_VOLU); |
@@ -68,4 +68,5 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||
68 | tap_code(KC_LEFT); | 68 | tap_code(KC_LEFT); |
69 | } | 69 | } |
70 | } | 70 | } |
71 | return true; | ||
71 | } | 72 | } |
diff --git a/keyboards/basekeys/trifecta/keymaps/via/keymap.c b/keyboards/basekeys/trifecta/keymaps/via/keymap.c index e1f401bc2..54e25ff37 100644 --- a/keyboards/basekeys/trifecta/keymaps/via/keymap.c +++ b/keyboards/basekeys/trifecta/keymaps/via/keymap.c | |||
@@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
32 | ), | 32 | ), |
33 | 33 | ||
34 | [_FN] = LAYOUT( | 34 | [_FN] = LAYOUT( |
35 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, | 35 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, |
36 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 36 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
37 | _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 37 | _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
38 | _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, | 38 | _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, |
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
48 | ) | 48 | ) |
49 | }; | 49 | }; |
50 | 50 | ||
51 | void encoder_update_user(uint8_t index, bool clockwise) { | 51 | bool encoder_update_user(uint8_t index, bool clockwise) { |
52 | if (index == 0) { /* First encoder */ | 52 | if (index == 0) { /* First encoder */ |
53 | if (clockwise) { | 53 | if (clockwise) { |
54 | tap_code(KC_VOLU); | 54 | tap_code(KC_VOLU); |
@@ -68,4 +68,5 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||
68 | rgblight_step_reverse(); | 68 | rgblight_step_reverse(); |
69 | } | 69 | } |
70 | } | 70 | } |
71 | return true; | ||
71 | } | 72 | } |