summaryrefslogtreecommitdiff
path: root/keyboards/geistmaschine/geist/geist.c
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2023-03-23 01:41:42 -0700
committerDrashna Jael're <drashna@live.com>2023-03-23 01:41:42 -0700
commit73f4718f16893341cfcc7814247deb605657ff27 (patch)
tree78f78d7199cf2fd3aac3f64cbba68f523ba11710 /keyboards/geistmaschine/geist/geist.c
parentb01dc36fbf09c3ebf8efe1bac54205ace1b1c6cc (diff)
parentbb4abc8a9fdbfbb8ee8af92ec14d6f1b4cea0b04 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/geistmaschine/geist/geist.c')
-rw-r--r--keyboards/geistmaschine/geist/geist.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/keyboards/geistmaschine/geist/geist.c b/keyboards/geistmaschine/geist/geist.c
new file mode 100644
index 0000000000..2f6825e2ee
--- /dev/null
+++ b/keyboards/geistmaschine/geist/geist.c
@@ -0,0 +1,21 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+
+// This will be overridden by encoder map in all default keymaps, but serves as a catch-all for user keymaps that may omit the map.
+#if defined (ENCODER_ENABLE) && !defined (ENCODER_MAP_ENABLE)
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) {
+ return false; /* Don't process further events if user function exists and returns false */
+ }
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ tap_code_delay(KC_VOLU, 10);
+ } else {
+ tap_code_delay(KC_VOLD, 10);
+ }
+ }
+ return true;
+}
+#endif \ No newline at end of file