mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-24 18:25:01 +06:00
[Bug] Fix Swap Hands bug introduced by OSH (#9968)
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.
This commit is contained in:
parent
b506c498a7
commit
c7b56bee96
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user