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/keysofkings | |
| 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/keysofkings')
| -rw-r--r-- | keyboards/keysofkings/twokey/keymaps/default/keymap.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/keyboards/keysofkings/twokey/keymaps/default/keymap.c b/keyboards/keysofkings/twokey/keymaps/default/keymap.c index eaa4f88de..f5a373298 100644 --- a/keyboards/keysofkings/twokey/keymaps/default/keymap.c +++ b/keyboards/keysofkings/twokey/keymaps/default/keymap.c | |||
| @@ -1,60 +1,60 @@ | |||
| 1 | /* Copyright 2020 Keys of Kings | 1 | /* Copyright 2020 Keys of Kings |
| 2 | * | 2 | * |
| 3 | * This program is free software: you can redistribute it and/or modify | 3 | * This program is free software: you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation, either version 2 of the License, or | 5 | * the Free Software Foundation, either version 2 of the License, or |
| 6 | * (at your option) any later version. | 6 | * (at your option) any later version. |
| 7 | * | 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
| 12 | * | 12 | * |
| 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 18 | 18 | ||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 20 | LAYOUT( | 20 | LAYOUT( |
| 21 | LT(1, KC_MUTE), | 21 | LT(1, KC_MUTE), |
| 22 | LT(4, KC_MPLY), LT(7, KC_MNXT)), | 22 | LT(4, KC_MPLY), LT(7, KC_MNXT)), |
| 23 | 23 | ||
| 24 | LAYOUT( | 24 | LAYOUT( |
| 25 | KC_TRNS, | 25 | KC_TRNS, |
| 26 | TO(2), TO(3)), | 26 | TO(2), TO(3)), |
| 27 | 27 | ||
| 28 | LAYOUT( | 28 | LAYOUT( |
| 29 | TO(0), | 29 | TO(0), |
| 30 | RGB_TOG, RGB_MOD), | 30 | RGB_TOG, RGB_MOD), |
| 31 | 31 | ||
| 32 | LAYOUT( | 32 | LAYOUT( |
| 33 | TO(0), | 33 | TO(0), |
| 34 | RGB_VAI, RGB_VAD), | 34 | RGB_VAI, RGB_VAD), |
| 35 | 35 | ||
| 36 | LAYOUT( | 36 | LAYOUT( |
| 37 | TO(0), | 37 | TO(0), |
| 38 | RGB_HUI, RGB_HUD), | 38 | RGB_HUI, RGB_HUD), |
| 39 | 39 | ||
| 40 | LAYOUT( | 40 | LAYOUT( |
| 41 | TO(5), | 41 | TO(5), |
| 42 | KC_TRNS, TO(6)), | 42 | KC_TRNS, TO(6)), |
| 43 | 43 | ||
| 44 | LAYOUT( | 44 | LAYOUT( |
| 45 | TO(0), | 45 | TO(0), |
| 46 | RGB_SAI, RGB_SAD), | 46 | RGB_SAI, RGB_SAD), |
| 47 | 47 | ||
| 48 | LAYOUT( | 48 | LAYOUT( |
| 49 | TO(8), | 49 | TO(8), |
| 50 | TO(9), KC_TRNS), | 50 | TO(9), KC_TRNS), |
| 51 | 51 | ||
| 52 | LAYOUT( | 52 | LAYOUT( |
| 53 | TO(0), | 53 | TO(0), |
| 54 | CK_TOGG, MU_TOG), | 54 | CK_TOGG, MU_TOG), |
| 55 | 55 | ||
| 56 | LAYOUT( | 56 | LAYOUT( |
| 57 | TO(0), | 57 | TO(0), |
| 58 | RESET, EEPROM_RESET), | 58 | RESET, EEPROM_RESET), |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| @@ -64,7 +64,7 @@ void matrix_init_user(void) { | |||
| 64 | debug_config.enable = 1; | 64 | debug_config.enable = 1; |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | void encoder_update_user(int8_t index, bool clockwise) { | 67 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 68 | if (index == 0) { | 68 | if (index == 0) { |
| 69 | if (clockwise) { | 69 | if (clockwise) { |
| 70 | tap_code(KC_VOLD); | 70 | tap_code(KC_VOLD); |
| @@ -75,5 +75,5 @@ void encoder_update_user(int8_t index, bool clockwise) { | |||
| 75 | clockwise ? clicky_freq_up() : clicky_freq_down(); | 75 | clockwise ? clicky_freq_up() : clicky_freq_down(); |
| 76 | # endif | 76 | # endif |
| 77 | } | 77 | } |
| 78 | return true; | ||
| 78 | } | 79 | } |
| 79 | |||
