OSL: Flip the `should_mask_on_interrupt_` bit on OSL release, not press

When we hold the OSL key, we do not need to mask out interruptors, because they
are not going to interrupt. As such, flip the `should_mask_on_interrupt_` bit on
OSL key release.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 87fbf85995
commit b1953f07a2

@ -93,16 +93,16 @@ Key OneShot::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_st
if (keyToggledOff(key_state)) {
clearPressed(idx);
if (mapped_key >= ranges::OSL_FIRST && mapped_key <= ranges::OSL_LAST) {
should_mask_on_interrupt_ = true;
}
} else if (keyToggledOn(key_state)) {
start_time_ = millis();
setPressed(idx);
setOneShot(idx);
saveAsPrevious(mapped_key);
if (mapped_key >= ranges::OSL_FIRST && mapped_key <= ranges::OSL_LAST) {
should_mask_on_interrupt_ = true;
}
activateOneShot(idx);
}

Loading…
Cancel
Save