summaryrefslogtreecommitdiff
path: root/common/keymap.h
diff options
context:
space:
mode:
authorChristoph Cullmann <christoph@cullmann.io>2024-09-22 17:50:24 +0200
committerChristoph Cullmann <christoph@cullmann.io>2024-09-22 17:50:24 +0200
commit051df94b90df93d3311e960c104c7a58eb49a57a (patch)
tree5565f2ae5deb57d9cfd5324a602c78e06110d18d /common/keymap.h
parentadd1488adc0b99c1a8e943bf852a0d049168ffcb (diff)
Revert "use code of https://github.com/filterpaper/qmk_userspace"
This reverts commit 8980edbc88646e803625ad89308d313b436fd389.
Diffstat (limited to 'common/keymap.h')
-rw-r--r--common/keymap.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/common/keymap.h b/common/keymap.h
index 3fdba83..ef49bf5 100644
--- a/common/keymap.h
+++ b/common/keymap.h
@@ -1,5 +1,18 @@
-// Copyright Christoph Cullmann
-// SPDX-License-Identifier: GPL-2.0+
+/* Copyright 2022 Christoph Cullmann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
// our layers
enum my_layers {
@@ -50,7 +63,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-#include "filterpaper.h"
+#include "achordion.h"
+
+bool process_record_user(uint16_t keycode, keyrecord_t* record) {
+ if (!process_achordion(keycode, record)) { return false; }
+ return true;
+}
+
+void matrix_scan_user(void) {
+ achordion_task();
+}
+
+bool achordion_chord(uint16_t tap_hold_keycode,
+ keyrecord_t* tap_hold_record,
+ uint16_t other_keycode,
+ keyrecord_t* other_record) {
+ // follow the opposite hands rule.
+ return on_left_hand(tap_hold_record->event.key) !=
+ on_left_hand(other_record->event.key);
+}
void keyboard_post_init_user(void) {
// always use the same effect