diff options
Diffstat (limited to 'users/drashna/tap_dances.c')
| -rw-r--r-- | users/drashna/tap_dances.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/users/drashna/tap_dances.c b/users/drashna/tap_dances.c index 6b27afc5a..01873489d 100644 --- a/users/drashna/tap_dances.c +++ b/users/drashna/tap_dances.c | |||
| @@ -26,7 +26,7 @@ uint8_t diablo_times[] = {0, 1, 3, 5, 10, 30}; | |||
| 26 | 26 | ||
| 27 | // Cycle through the times for the macro, starting at 0, for disabled. | 27 | // Cycle through the times for the macro, starting at 0, for disabled. |
| 28 | void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) { | 28 | void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) { |
| 29 | diable_keys_t *diablo_keys = (diable_keys_t *)user_data; | 29 | diable_keys_t *diablo_keys = (diable_keys_t *)user_data; |
| 30 | // Sets the keycode based on the index | 30 | // Sets the keycode based on the index |
| 31 | diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode; | 31 | diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode; |
| 32 | 32 | ||
| @@ -34,7 +34,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) { | |||
| 34 | if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t))) { | 34 | if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t))) { |
| 35 | diablo_timer[diablo_keys->index].key_interval = 0; | 35 | diablo_timer[diablo_keys->index].key_interval = 0; |
| 36 | reset_tap_dance(state); | 36 | reset_tap_dance(state); |
| 37 | } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one) | 37 | } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one) |
| 38 | diablo_timer[diablo_keys->index].key_interval = diablo_times[state->count - 1]; | 38 | diablo_timer[diablo_keys->index].key_interval = diablo_times[state->count - 1]; |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| @@ -64,7 +64,9 @@ void run_diablo_macro_check(void) { | |||
| 64 | // reset the timer, since enough time has passed | 64 | // reset the timer, since enough time has passed |
| 65 | diablo_timer[index].timer = timer_read(); | 65 | diablo_timer[index].timer = timer_read(); |
| 66 | // send keycode ONLY if we're on the diablo layer. | 66 | // send keycode ONLY if we're on the diablo layer. |
| 67 | if (IS_LAYER_ON(_DIABLO)) { tap_code(diablo_timer[index].keycode); } | 67 | if (IS_LAYER_ON(_DIABLO)) { |
| 68 | tap_code(diablo_timer[index].keycode); | ||
| 69 | } | ||
| 68 | } | 70 | } |
| 69 | } | 71 | } |
| 70 | } | 72 | } |
