Macros: Be a bit less eager

The macro handler should only catch things that were meant to be its stuff, and
should only act on keypress, not all kinds of key events.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/68/head
Gergely Nagy 8 years ago
parent afac5ed6f2
commit 897349b836

@ -45,9 +45,12 @@ 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)) || (mappedKey.flags & IS_INTERNAL))
if (mappedKey.flags != (SYNTHETIC | IS_MACRO))
return false;
if (!key_toggled_on(keyState))
return true;
const macro_t *m = macroAction(mappedKey.rawKey, keyState);
Macros.play(m);

Loading…
Cancel
Save