Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
qmk-bot committed Sep 12, 2021
2 parents dad915e + 76bfbb1 commit f65724b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 0 additions & 6 deletions quantum/action.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ __attribute__((weak)) bool get_retro_tapping(uint16_t keycode, keyrecord_t *reco

__attribute__((weak)) bool pre_process_record_quantum(keyrecord_t *record) { return true; }

#ifndef TAP_CODE_DELAY
# define TAP_CODE_DELAY 0
#endif
#ifndef TAP_HOLD_CAPS_DELAY
# define TAP_HOLD_CAPS_DELAY 80
#endif
/** \brief Called to execute an action.
*
* FIXME: Needs documentation.
Expand Down
7 changes: 7 additions & 0 deletions quantum/action.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ extern "C" {
# endif
#endif

#ifndef TAP_CODE_DELAY
# define TAP_CODE_DELAY 0
#endif
#ifndef TAP_HOLD_CAPS_DELAY
# define TAP_HOLD_CAPS_DELAY 80
#endif

/* tapping count and state */
typedef struct {
bool interrupted : 1;
Expand Down
2 changes: 2 additions & 0 deletions quantum/process_keycode/process_tap_dance.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ void qk_tap_dance_pair_finished(qk_tap_dance_state_t *state, void *user_data) {
void qk_tap_dance_pair_reset(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;

wait_ms(TAP_CODE_DELAY);
if (state->count == 1) {
unregister_code16(pair->kc1);
} else if (state->count == 2) {
Expand Down Expand Up @@ -74,6 +75,7 @@ void qk_tap_dance_dual_role_reset(qk_tap_dance_state_t *state, void *user_data)
qk_tap_dance_dual_role_t *pair = (qk_tap_dance_dual_role_t *)user_data;

if (state->count == 1) {
wait_ms(TAP_CODE_DELAY);
unregister_code16(pair->kc);
}
}
Expand Down

0 comments on commit f65724b

Please sign in to comment.