aboutsummaryrefslogtreecommitdiff
path: root/keyboards/sofle/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/sofle/keymaps')
-rw-r--r--keyboards/sofle/keymaps/default/keymap.c3
-rw-r--r--keyboards/sofle/keymaps/via/encoder.c31
2 files changed, 18 insertions, 16 deletions
diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c
index 38200bfb7..2360a45d4 100644
--- a/keyboards/sofle/keymaps/default/keymap.c
+++ b/keyboards/sofle/keymaps/default/keymap.c
@@ -373,7 +373,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
373 373
374#ifdef ENCODER_ENABLE 374#ifdef ENCODER_ENABLE
375 375
376void encoder_update_user(uint8_t index, bool clockwise) { 376bool encoder_update_user(uint8_t index, bool clockwise) {
377 if (index == 0) { 377 if (index == 0) {
378 if (clockwise) { 378 if (clockwise) {
379 tap_code(KC_VOLU); 379 tap_code(KC_VOLU);
@@ -387,6 +387,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
387 tap_code(KC_PGUP); 387 tap_code(KC_PGUP);
388 } 388 }
389 } 389 }
390 return true;
390} 391}
391 392
392#endif 393#endif
diff --git a/keyboards/sofle/keymaps/via/encoder.c b/keyboards/sofle/keymaps/via/encoder.c
index 8126d077a..f6e267e09 100644
--- a/keyboards/sofle/keymaps/via/encoder.c
+++ b/keyboards/sofle/keymaps/via/encoder.c
@@ -1,25 +1,25 @@
1 /* Copyright 2020 Josef Adamcik 1 /* Copyright 2020 Josef Adamcik
2 * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang 2 * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang
3 * 3 *
4 * This program is free software: you can redistribute it and/or modify 4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or 6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version. 7 * (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18//Setting up what encoder rotation does. If your encoder can be pressed as a button, that function can be set in Via. 18//Setting up what encoder rotation does. If your encoder can be pressed as a button, that function can be set in Via.
19 19
20#ifdef ENCODER_ENABLE 20#ifdef ENCODER_ENABLE
21 21
22void encoder_update_user(uint8_t index, bool clockwise) { 22bool encoder_update_user(uint8_t index, bool clockwise) {
23 if (index == 0) { 23 if (index == 0) {
24 if (clockwise) { 24 if (clockwise) {
25 tap_code(KC_VOLU); 25 tap_code(KC_VOLU);
@@ -33,6 +33,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
33 tap_code(KC_PGUP); 33 tap_code(KC_PGUP);
34 } 34 }
35 } 35 }
36 return true;
36} 37}
37 38
38#endif \ No newline at end of file 39#endif