Tap dance introspection (#24049)
This commit is contained in:
parent
b9e67347f1
commit
4ae0ca5a11
7 changed files with 60 additions and 12 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "quantum.h"
|
||||
#include "examples.h"
|
||||
#include "keymap_introspection.h"
|
||||
|
||||
// Example code from the tap dance documentation, adapted for testing
|
||||
|
||||
|
@ -83,7 +84,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
|
||||
switch (keycode) {
|
||||
case TD(CT_CLN):
|
||||
action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)];
|
||||
action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode));
|
||||
if (!record->event.pressed && action->state.count && !action->state.finished) {
|
||||
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data;
|
||||
tap_code16(tap_hold->tap);
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
SRC += tap_dance_defs.c
|
||||
INTROSPECTION_KEYMAP_C = tap_dance_defs.c
|
||||
|
|
|
@ -18,5 +18,4 @@
|
|||
# --------------------------------------------------------------------------------
|
||||
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
SRC += examples.c
|
||||
INTROSPECTION_KEYMAP_C = examples.c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue