diff options
| author | Nick Choi <iinikchi@gmail.com> | 2017-05-25 16:26:30 -0400 |
|---|---|---|
| committer | Nick Choi <iinikchi@gmail.com> | 2017-05-25 16:26:30 -0400 |
| commit | aeb3a34636c614cd392cfc6268491a51a461df31 (patch) | |
| tree | 4395604c2c6bd7d9adb0f1eb0d99b2f536eec88f /quantum/process_keycode/process_tap_dance.c | |
| parent | e695b5a33b97cfb4f9dd8bc8ecaff8aa7e0f14cc (diff) | |
| download | qmk_firmware-aeb3a34636c614cd392cfc6268491a51a461df31.tar.gz qmk_firmware-aeb3a34636c614cd392cfc6268491a51a461df31.zip | |
moved specific tap term to its own function
included custom_tapping_term in action struct
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.c')
| -rw-r--r-- | quantum/process_keycode/process_tap_dance.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index e58b6f2df..2c7f6e937 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) { | |||
| 127 | return true; | 127 | return true; |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | |||
| 131 | |||
| 130 | void matrix_scan_tap_dance () { | 132 | void matrix_scan_tap_dance () { |
| 131 | if (highest_td == -1) | 133 | if (highest_td == -1) |
| 132 | return; | 134 | return; |
| @@ -134,8 +136,8 @@ void matrix_scan_tap_dance () { | |||
| 134 | 136 | ||
| 135 | for (int i = 0; i <= highest_td; i++) { | 137 | for (int i = 0; i <= highest_td; i++) { |
| 136 | qk_tap_dance_action_t *action = &tap_dance_actions[i]; | 138 | qk_tap_dance_action_t *action = &tap_dance_actions[i]; |
| 137 | if(action->user_data != NULL ) { | 139 | if(action->custom_tapping_term > 0 ) { |
| 138 | tap_user_defined = (int)action->user_data; | 140 | tap_user_defined = action->custom_tapping_term; |
| 139 | } | 141 | } |
| 140 | else{ | 142 | else{ |
| 141 | tap_user_defined = TAPPING_TERM; | 143 | tap_user_defined = TAPPING_TERM; |
