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 78368e9687..5ce5d22b06 100644 --- a/keyboards/pearlboards/pandora/pandora.c +++ b/keyboards/pearlboards/pandora/pandora.c @@ -15,3 +15,28 @@ */ #include "pandora.h" + +// Encoder rotate function +bool encoder_update_user(uint8_t index, bool clockwise) { + /* First encoder */ + if (index == 0) { + if (clockwise) { + tap_code(KC_AUDIO_VOL_UP); + } else { + tap_code(KC_AUDIO_VOL_DOWN); + } + } + return true; +} +// Encoder click function +bool dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + /* First encoder */ + case 0: + if (active) { + tap_code(KC_MEDIA_PLAY_PAUSE); + } + break; + } + return true; +} |