aboutsummaryrefslogtreecommitdiffstats
path: root/Model01-Firmware.ino
diff options
context:
space:
mode:
Diffstat (limited to 'Model01-Firmware.ino')
-rw-r--r--Model01-Firmware.ino10
1 files changed, 7 insertions, 3 deletions
diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino
index 6111088..1b15ace 100644
--- a/Model01-Firmware.ino
+++ b/Model01-Firmware.ino
@@ -101,9 +101,13 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
} else if (macroIndex == 1 && keyToggledOn(keyState)) {
Macros.type(PSTR("Keyboardio Model 01 - Kaleidoscope "));
Macros.type(PSTR(BUILD_INFORMATION));
- } else if (macroIndex == MACRO_ANY && keyToggledOn(keyState)) {
- Keyboard.press(Key_A.keyCode + (uint8_t)(millis() % 36));
- Keyboard.sendReport();
+ } else if (macroIndex == MACRO_ANY) {
+ static Key lastKey;
+ if (keyToggledOn(keyState))
+ lastKey.keyCode = Key_A.keyCode + (uint8_t)(millis() % 36);
+
+ if (keyIsPressed(keyState))
+ kaleidoscope::hid::pressKey(lastKey);
}
return MACRO_NONE;
}