aboutsummaryrefslogtreecommitdiff
path: root/keyboards/sofle/keymaps/via/encoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/sofle/keymaps/via/encoder.c')
-rw-r--r--keyboards/sofle/keymaps/via/encoder.c31
1 files changed, 16 insertions, 15 deletions
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