Do not cancel OneShot if a oneshot is still held

Fixes #5.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/389/head
Gergely Nagy 7 years ago
parent 2a5ba8f6b2
commit 1844d88c76

@ -10,8 +10,9 @@
[st:experimental]: https://img.shields.io/badge/experimental----black.svg?style=flat&colorA=dfb317&colorB=494e52
Turn the `Esc` key into a special key, that can cancel any active `OneShot`
effect - or act as the normal `Esc` key if none are active. For those times when
one accidentally presses a one-shot key, or change their minds.
effect - or act as the normal `Esc` key if none are active, or if any of them
are still held. For those times when one accidentally presses a one-shot key, or
change their minds.
## Using the plugin

@ -28,7 +28,7 @@ EventHandlerResult EscapeOneShot::onKeyswitchEvent(Key &mapped_key, byte row, by
!keyToggledOn(keyState))
return EventHandlerResult::OK;
if (!::OneShot.isActive())
if (!::OneShot.isActive() || ::OneShot.isPressed())
return EventHandlerResult::OK;
KeyboardHardware.maskKey(row, col);

Loading…
Cancel
Save