macros: Do not catch keys not intended for us

Keys that have the IS_INTERNAL flag set can also have the same bit set as the
IS_MACRO bit, yet, we do not want to handle those as if they were macros. So
teach `handleMacroEvent` to skip keys with that bit set.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/58/head
Gergely Nagy 8 years ago
parent 4aa6e14021
commit 52fdbf773e

@ -45,7 +45,7 @@ void Macros_::play(const macro_t *macro_p) {
}
static bool handleMacroEvent(Key mappedKey, byte row, byte col, uint8_t keyState) {
if (!(mappedKey.flags & (SYNTHETIC|IS_MACRO)))
if (!(mappedKey.flags & (SYNTHETIC|IS_MACRO)) || (mappedKey.flags & IS_INTERNAL))
return false;
const macro_t *m = macroAction(mappedKey.rawKey, keyState);

Loading…
Cancel
Save