Make the macros aware of the row/col they were pressed at

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

@ -1,7 +1,7 @@
#include "Keyboardio-Macros.h"
__attribute__((weak))
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
const macro_t *macroAction(uint8_t macroIndex, byte row, byte col, uint8_t keyState) {
return MACRO_NONE;
}
@ -51,7 +51,7 @@ static Key handleMacroEvent(Key mappedKey, byte row, byte col, uint8_t keyState)
if (!key_toggled_on(keyState))
return Key_NoKey;
const macro_t *m = macroAction(mappedKey.keyCode, keyState);
const macro_t *m = macroAction(mappedKey.keyCode, row, col, keyState);
Macros.play(m);
return Key_NoKey;

@ -5,7 +5,7 @@
#include "MacroKeyDefs.h"
#include "MacroSteps.h"
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState);
const macro_t *macroAction(uint8_t macroIndex, byte row, byte col, uint8_t keyState);
class Macros_ : public KeyboardioPlugin {
public:

Loading…
Cancel
Save