diff options
author | Moritz Plattner <moritz.plattner@gmx.net> | 2023-04-02 20:02:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-02 12:02:20 -0600 |
commit | 5687fc76468803db27dd9f04a72766f80141c6cd (patch) | |
tree | d91bf941b810ba958085efd81bca55a26325912c /keyboards/geistmaschine/macropod/macropod.c | |
parent | ebe36ea83c860fc26e4e8344a133eb0355b411f0 (diff) |
Add support for Geistmaschine Macropod (#20116)
Co-authored-by: Pablo MartÃnez <58857054+elpekenin@users.noreply.github.com>
Diffstat (limited to 'keyboards/geistmaschine/macropod/macropod.c')
-rw-r--r-- | keyboards/geistmaschine/macropod/macropod.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/keyboards/geistmaschine/macropod/macropod.c b/keyboards/geistmaschine/macropod/macropod.c new file mode 100644 index 0000000000..2f6825e2ee --- /dev/null +++ b/keyboards/geistmaschine/macropod/macropod.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 |