aboutsummaryrefslogtreecommitdiff
path: root/keyboards/splitkb/halcyon/kyria/rev4/rev4.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/splitkb/halcyon/kyria/rev4/rev4.c')
-rw-r--r--keyboards/splitkb/halcyon/kyria/rev4/rev4.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/keyboards/splitkb/halcyon/kyria/rev4/rev4.c b/keyboards/splitkb/halcyon/kyria/rev4/rev4.c
new file mode 100644
index 0000000000..27671b9d7c
--- /dev/null
+++ b/keyboards/splitkb/halcyon/kyria/rev4/rev4.c
@@ -0,0 +1,28 @@
+// Copyright 2024 splitkb.com (support@splitkb.com)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) {
+ return false;
+ }
+ if (index == 0) {
+ // Volume control
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (index == 1) {
+ // Page up/Page down
+ if (clockwise) {
+ tap_code(KC_PGDN);
+ } else {
+ tap_code(KC_PGUP);
+ }
+ }
+ return false;
+}
+#endif