summaryrefslogtreecommitdiff
path: root/tests/tap_dance/tap_dance_layers/tap_dance_defs.h
diff options
context:
space:
mode:
authorSergey Vlasov <sigprof@gmail.com>2022-10-03 12:48:16 +0300
committerGitHub <noreply@github.com>2022-10-03 20:48:16 +1100
commitca0c12847a97a62f887fd4625673395104a7257b (patch)
tree5948722aba72b72e549232950f38a35500638262 /tests/tap_dance/tap_dance_layers/tap_dance_defs.h
parent0e6f1914367c59ced83c45ff4212fcc489918936 (diff)
Fix layer switching from tap dances by redoing the keymap lookup (#17935)
Diffstat (limited to 'tests/tap_dance/tap_dance_layers/tap_dance_defs.h')
-rw-r--r--tests/tap_dance/tap_dance_layers/tap_dance_defs.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/tap_dance/tap_dance_layers/tap_dance_defs.h b/tests/tap_dance/tap_dance_layers/tap_dance_defs.h
new file mode 100644
index 0000000000..37cab0c2cb
--- /dev/null
+++ b/tests/tap_dance/tap_dance_layers/tap_dance_defs.h
@@ -0,0 +1,29 @@
+// Copyright 2022 Sergey Vlasov (@sigprof)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum custom_keycodes {
+ // (FAST|SLOW)_xy = tap KC_x on press, tap KC_y on release. For FAST_xy
+ // process_record_user() returns false to stop processing early; for
+ // SLOW_xy process_record_user() returns true, therefore all other key
+ // handlers are invoked.
+ FAST_AB = SAFE_RANGE,
+ FAST_CD,
+ SLOW_AB,
+ SLOW_CD,
+};
+
+enum tap_dance_ids {
+ TD_L_MOVE, // ACTION_TAP_DANCE_LAYER_MOVE(KC_APP, 1)
+ TD_L_TOGG, // ACTION_TAP_DANCE_LAYER_TOGGLE(KC_APP, 1)
+ TD_LT_APP, // similar to LT(1, KC_APP) with KC_RCTL on tap+hold or double tap
+};
+
+#ifdef __cplusplus
+}
+#endif