Don't pass all INJECTED keys through

Only pass INJECTED keys through, if we are already active. This way, another
plugin can trigger us by injecting a SYSTER key.

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

@ -50,9 +50,6 @@ namespace Akela {
// --- hooks ---
Key
Syster::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) {
if (keyState & INJECTED)
return mappedKey;
if (!isActive) {
if (!isSyster (mappedKey))
return mappedKey;
@ -64,6 +61,9 @@ namespace Akela {
return Key_NoKey;
}
if (keyState & INJECTED)
return mappedKey;
if (isSyster (mappedKey))
return Key_NoKey;

Loading…
Cancel
Save