summaryrefslogtreecommitdiff
path: root/keyboards/lw75/lw75.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/lw75/lw75.c')
-rw-r--r--keyboards/lw75/lw75.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/keyboards/lw75/lw75.c b/keyboards/lw75/lw75.c
new file mode 100644
index 0000000000..110a26ce1a
--- /dev/null
+++ b/keyboards/lw75/lw75.c
@@ -0,0 +1,19 @@
+// Copyright 2023 Laneware Peripherals
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "lw75.h"
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+ return true;
+}
+#endif
+