From aeb3a34636c614cd392cfc6268491a51a461df31 Mon Sep 17 00:00:00 2001 From: Nick Choi Date: Thu, 25 May 2017 16:26:30 -0400 Subject: moved specific tap term to its own function included custom_tapping_term in action struct --- quantum/process_keycode/process_tap_dance.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'quantum/process_keycode/process_tap_dance.c') diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index e58b6f2dfe..2c7f6e937e 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -127,6 +127,8 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { return true; } + + void matrix_scan_tap_dance () { if (highest_td == -1) return; @@ -134,8 +136,8 @@ void matrix_scan_tap_dance () { for (int i = 0; i <= highest_td; i++) { qk_tap_dance_action_t *action = &tap_dance_actions[i]; - if(action->user_data != NULL ) { - tap_user_defined = (int)action->user_data; + if(action->custom_tapping_term > 0 ) { + tap_user_defined = action->custom_tapping_term; } else{ tap_user_defined = TAPPING_TERM; -- cgit v1.2.3