Instead of calling macroAction only on keydown, call it every time

Call `macroAction` for all `keyState`s, not only when a key toggled on. This
lets the macro itself decide when to act, and makes it possible to have macro
effects on the other states.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/365/head
Gergely Nagy 8 years ago
parent e38836a7bb
commit 8be09348a0

@ -50,9 +50,6 @@ static Key handleMacroEvent(Key mappedKey, byte row, byte col, uint8_t keyState)
if (mappedKey.flags != (SYNTHETIC | IS_MACRO)) if (mappedKey.flags != (SYNTHETIC | IS_MACRO))
return mappedKey; return mappedKey;
if (!key_toggled_on(keyState))
return Key_NoKey;
Macros_::row = row; Macros_::row = row;
Macros_::col = col; Macros_::col = col;
const macro_t *m = macroAction(mappedKey.keyCode, keyState); const macro_t *m = macroAction(mappedKey.keyCode, keyState);

Loading…
Cancel
Save