Skip to content

Commit

Permalink
[Bug] Fix Swap Hands bug introduced by OSH (qmk#9968)
Browse files Browse the repository at this point in the history
Fixes the handling for the oneshot cleanup, so it only cleans up if it is active.  It should not cleanup of SHO is off (eg using a normal oneshot key), nor if it's actively pressed or used.  

Previous behavior BROKE swap hand key.
  • Loading branch information
drashna authored and fdawans committed Aug 11, 2020
1 parent b67f02f commit 1d30810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tmk_core/common/action_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static uint16_t oneshot_layer_time = 0;
inline bool has_oneshot_layer_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_layer_time) >= ONESHOT_TIMEOUT && !(get_oneshot_layer_state() & ONESHOT_TOGGLED); }
# ifdef SWAP_HANDS_ENABLE
static uint16_t oneshot_swaphands_time = 0;
inline bool has_oneshot_swaphands_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_swaphands_time) >= ONESHOT_TIMEOUT && !(swap_hands_oneshot >= SHO_PRESSED); }
inline bool has_oneshot_swaphands_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_swaphands_time) >= ONESHOT_TIMEOUT && (swap_hands_oneshot == SHO_ACTIVE); }
# endif
# endif

Expand Down

0 comments on commit 1d30810

Please sign in to comment.