summaryrefslogtreecommitdiffstats
path: root/keyboards/anavi/macropad10/macropad10.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/anavi/macropad10/macropad10.c')
-rw-r--r--keyboards/anavi/macropad10/macropad10.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/keyboards/anavi/macropad10/macropad10.c b/keyboards/anavi/macropad10/macropad10.c
new file mode 100644
index 0000000000..bebefd0da9
--- /dev/null
+++ b/keyboards/anavi/macropad10/macropad10.c
@@ -0,0 +1,16 @@
+// Copyright 2022 Leon Anavi <leon@anavi.org>
+// SPDX-License-Identifier: GPL-2.0-or-later
+#include "encoder.h"
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) { return false; }
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ return true;
+}
+#endif
+