diff options
| author | Nick Brassel <nick@tzarc.org> | 2024-07-06 09:57:54 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-06 00:57:54 +0100 |
| commit | 4ae0ca5a11c475ee49bbce13d29edbf9bd6fc636 (patch) | |
| tree | 3db17c17257f9079a9dbf847041e4af255e89fbf /tests/tap_dance | |
| parent | b9e67347f1db160a5d1bd718ab0713a407014e43 (diff) | |
Tap dance introspection (#24049)
Diffstat (limited to 'tests/tap_dance')
| -rw-r--r-- | tests/tap_dance/examples.c | 3 | ||||
| -rw-r--r-- | tests/tap_dance/tap_dance_layers/test.mk | 2 | ||||
| -rw-r--r-- | tests/tap_dance/test.mk | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/tap_dance/examples.c b/tests/tap_dance/examples.c index 5377b397d3..4b6bdb2090 100644 --- a/tests/tap_dance/examples.c +++ b/tests/tap_dance/examples.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | #include "quantum.h" | 17 | #include "quantum.h" |
| 18 | #include "examples.h" | 18 | #include "examples.h" |
| 19 | #include "keymap_introspection.h" | ||
| 19 | 20 | ||
| 20 | // Example code from the tap dance documentation, adapted for testing | 21 | // Example code from the tap dance documentation, adapted for testing |
| 21 | 22 | ||
| @@ -83,7 +84,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 83 | 84 | ||
| 84 | switch (keycode) { | 85 | switch (keycode) { |
| 85 | case TD(CT_CLN): | 86 | case TD(CT_CLN): |
| 86 | action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)]; | 87 | action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); |
| 87 | if (!record->event.pressed && action->state.count && !action->state.finished) { | 88 | if (!record->event.pressed && action->state.count && !action->state.finished) { |
| 88 | tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; | 89 | tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; |
| 89 | tap_code16(tap_hold->tap); | 90 | tap_code16(tap_hold->tap); |
diff --git a/tests/tap_dance/tap_dance_layers/test.mk b/tests/tap_dance/tap_dance_layers/test.mk index b4cdc9b088..a677fda648 100644 --- a/tests/tap_dance/tap_dance_layers/test.mk +++ b/tests/tap_dance/tap_dance_layers/test.mk | |||
| @@ -7,4 +7,4 @@ | |||
| 7 | 7 | ||
| 8 | TAP_DANCE_ENABLE = yes | 8 | TAP_DANCE_ENABLE = yes |
| 9 | 9 | ||
| 10 | SRC += tap_dance_defs.c | 10 | INTROSPECTION_KEYMAP_C = tap_dance_defs.c |
diff --git a/tests/tap_dance/test.mk b/tests/tap_dance/test.mk index 041d9b4dc9..0e727da9e8 100644 --- a/tests/tap_dance/test.mk +++ b/tests/tap_dance/test.mk | |||
| @@ -18,5 +18,4 @@ | |||
| 18 | # -------------------------------------------------------------------------------- | 18 | # -------------------------------------------------------------------------------- |
| 19 | 19 | ||
| 20 | TAP_DANCE_ENABLE = yes | 20 | TAP_DANCE_ENABLE = yes |
| 21 | 21 | INTROSPECTION_KEYMAP_C = examples.c | |
| 22 | SRC += examples.c | ||
