summaryrefslogtreecommitdiff
path: root/keyboards/pearlboards/pandora/pandora.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-12-23 21:43:43 +0000
committerQMK Bot <hello@qmk.fm>2021-12-23 21:43:43 +0000
commit4582b1b41a4f6bcb36622dbe7fd5c542e7cdb2b7 (patch)
tree94bd224fce1a22902aa5d19604df2eae9966c0c2 /keyboards/pearlboards/pandora/pandora.c
parentd737b4704ce3ef7b3c529b494135403eb178f5e9 (diff)
parente804e28e8e54d6821737fc32f31b7f2735a5994d (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/pearlboards/pandora/pandora.c')
-rw-r--r--keyboards/pearlboards/pandora/pandora.c25
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;
+}