|
|
@ -22,16 +22,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace KaleidoscopePlugins {
|
|
|
|
namespace KaleidoscopePlugins {
|
|
|
|
|
|
|
|
|
|
|
|
EscapeOneShot::EscapeOneShot (void) {
|
|
|
|
EscapeOneShot::EscapeOneShot (void) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
EscapeOneShot::begin (void) {
|
|
|
|
EscapeOneShot::begin (void) {
|
|
|
|
event_handler_hook_use (eventHandlerHook);
|
|
|
|
event_handler_hook_use (eventHandlerHook);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Key
|
|
|
|
Key
|
|
|
|
EscapeOneShot::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) {
|
|
|
|
EscapeOneShot::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) {
|
|
|
|
if (mappedKey.raw != Key_Escape.raw ||
|
|
|
|
if (mappedKey.raw != Key_Escape.raw ||
|
|
|
|
(keyState & INJECTED) ||
|
|
|
|
(keyState & INJECTED) ||
|
|
|
|
!key_toggled_on (keyState))
|
|
|
|
!key_toggled_on (keyState))
|
|
|
@ -43,7 +43,7 @@ namespace KaleidoscopePlugins {
|
|
|
|
OneShot::cancel ();
|
|
|
|
OneShot::cancel ();
|
|
|
|
|
|
|
|
|
|
|
|
return Key_NoKey;
|
|
|
|
return Key_NoKey;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
KaleidoscopePlugins::EscapeOneShot EscapeOneShot;
|
|
|
|
KaleidoscopePlugins::EscapeOneShot EscapeOneShot;
|
|
|
|