mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Tap dance introspection (#24049)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user