summaryrefslogtreecommitdiff
path: root/keyboards/chocofly/chocofly.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/chocofly/chocofly.c')
-rw-r--r--keyboards/chocofly/chocofly.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/keyboards/chocofly/chocofly.c b/keyboards/chocofly/chocofly.c
new file mode 100644
index 0000000000..8ae38602ab
--- /dev/null
+++ b/keyboards/chocofly/chocofly.c
@@ -0,0 +1,16 @@
+// Copyright 2022 Vitaly Volkov (@vlkv)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "chocofly.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 false;
+}
+#endif