summaryrefslogtreecommitdiffstats
path: root/users/drashna/keyrecords/tapping.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-12-30 04:18:05 +0000
committerQMK Bot <hello@qmk.fm>2021-12-30 04:18:05 +0000
commit602b0b14d5d1b67951851c9880dc426411cc65d9 (patch)
tree7ebaa2f5bb8c1a7ac87f4be84ce88ba73cd3968e /users/drashna/keyrecords/tapping.c
parentdde5cd1c54fc6f93ff439666f5c421a451e4e8dd (diff)
parentc4551d7ef1ed2c1069f23cc8499b7c7fc30f3ecf (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'users/drashna/keyrecords/tapping.c')
-rw-r--r--users/drashna/keyrecords/tapping.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/users/drashna/keyrecords/tapping.c b/users/drashna/keyrecords/tapping.c
new file mode 100644
index 0000000000..9c4892b33d
--- /dev/null
+++ b/users/drashna/keyrecords/tapping.c
@@ -0,0 +1,64 @@
+// Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "drashna.h"
+
+__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BK_LWER:
+ return TAPPING_TERM + 25;
+ default:
+ return TAPPING_TERM;
+ }
+}
+
+__attribute__((weak)) bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
+ // Immediately select the hold action when another key is tapped:
+ // return true;
+ // Do not select the hold action when another key is tapped.
+ // return false;
+ switch (keycode) {
+ default:
+ return false;
+ }
+}
+
+__attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
+ // Immediately select the hold action when another key is pressed.
+ // return true;
+ // Do not select the hold action when another key is pressed.
+ // return false;
+ switch (keycode) {
+ case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
+ return true;
+ default:
+ return false;
+ }
+}
+
+__attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
+ // Do not force the mod-tap key press to be handled as a modifier
+ // if any other key was pressed while the mod-tap key is held down.
+ // return true;
+ // Force the mod-tap key press to be handled as a modifier if any
+ // other key was pressed while the mod-tap key is held down.
+ // return false;
+ switch (keycode) {
+ default:
+ return true;
+ }
+}
+
+__attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ default:
+ return false;
+ }
+}
+
+__attribute__((weak)) bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ default:
+ return false;
+ }
+}