Simplify conditional
This commit is contained in:
parent
bfd93cc55e
commit
ba79ccaea2
1 changed files with 3 additions and 2 deletions
|
@ -588,8 +588,9 @@ static int position_state_changed_listener(const zmk_event_t *eh) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store the position of pressed key for positional hold-tap purposes.
|
// Store the position of pressed key for positional hold-tap purposes.
|
||||||
if (((!undecided_hold_tap->config->hold_trigger_on_release && ev->state) // key pressed
|
if ((undecided_hold_tap->config->hold_trigger_on_release !=
|
||||||
|| (undecided_hold_tap->config->hold_trigger_on_release && !ev->state)) // key released
|
ev->state) // key has been pressed and hold_trigger_on_release is not set, or key
|
||||||
|
// has been released and hold_trigger_on_release is set
|
||||||
&& (undecided_hold_tap->position_of_first_other_key_pressed ==
|
&& (undecided_hold_tap->position_of_first_other_key_pressed ==
|
||||||
-1) // no other key has been pressed yet
|
-1) // no other key has been pressed yet
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue