diff options
Diffstat (limited to 'keyboards/pearlboards/pandora/pandora.c')
-rw-r--r-- | keyboards/pearlboards/pandora/pandora.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/keyboards/pearlboards/pandora/pandora.c b/keyboards/pearlboards/pandora/pandora.c index 78368e968..5ce5d22b0 100644 --- a/keyboards/pearlboards/pandora/pandora.c +++ b/keyboards/pearlboards/pandora/pandora.c | |||
@@ -15,3 +15,28 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "pandora.h" | 17 | #include "pandora.h" |
18 | |||
19 | // Encoder rotate function | ||
20 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
21 | /* First encoder */ | ||
22 | if (index == 0) { | ||
23 | if (clockwise) { | ||
24 | tap_code(KC_AUDIO_VOL_UP); | ||
25 | } else { | ||
26 | tap_code(KC_AUDIO_VOL_DOWN); | ||
27 | } | ||
28 | } | ||
29 | return true; | ||
30 | } | ||
31 | // Encoder click function | ||
32 | bool dip_switch_update_user(uint8_t index, bool active) { | ||
33 | switch (index) { | ||
34 | /* First encoder */ | ||
35 | case 0: | ||
36 | if (active) { | ||
37 | tap_code(KC_MEDIA_PLAY_PAUSE); | ||
38 | } | ||
39 | break; | ||
40 | } | ||
41 | return true; | ||
42 | } | ||