1
0
Fork 0

Tap dance introspection (#24049)

This commit is contained in:
Nick Brassel 2024-07-06 09:57:54 +10:00 committed by GitHub
parent b9e67347f1
commit 4ae0ca5a11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 60 additions and 12 deletions

View file

@ -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);

View file

@ -7,4 +7,4 @@
TAP_DANCE_ENABLE = yes
SRC += tap_dance_defs.c
INTROSPECTION_KEYMAP_C = tap_dance_defs.c

View file

@ -18,5 +18,4 @@
# --------------------------------------------------------------------------------
TAP_DANCE_ENABLE = yes
SRC += examples.c
INTROSPECTION_KEYMAP_C = examples.c