summaryrefslogtreecommitdiff
path: root/keyboards/geistmaschine/geist/geist.c
diff options
context:
space:
mode:
authorMoritz Plattner <moritz.plattner@gmx.net>2023-03-23 06:09:33 +0100
committerGitHub <noreply@github.com>2023-03-22 22:09:33 -0700
commite624ce959a9fcd1c42e11c10c9ac04c5d6898c44 (patch)
tree4141293c18e6c067359b654b0bdf3b372a134081 /keyboards/geistmaschine/geist/geist.c
parent8cd78b392f57eb2919769867359fd8443e63c3f4 (diff)
[Keyboard] Add Geistmaschine Geist (#20117)
Co-authored-by: jack <0x6a73@protonmail.com>
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