summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Hustvedt <anders@computerfire.net>2018-10-29 06:09:15 -0600
committerAnders Hustvedt <anders@computerfire.net>2018-10-29 06:31:08 -0600
commitab57ab84689b91a49ec875b34f75e62ed5ef2a28 (patch)
tree5d22a993ac4ebac7fefcec0ba8367e58e5c324bb
parenta963b8074e72d05b231ac7af65b897fa405cbc58 (diff)
downloadmodel01-firmware-ab57ab84689b91a49ec875b34f75e62ed5ef2a28.tar.gz
model01-firmware-ab57ab84689b91a49ec875b34f75e62ed5ef2a28.tar.bz2
model01-firmware-ab57ab84689b91a49ec875b34f75e62ed5ef2a28.zip
Fix anyKeyMacro for new hid API
Signed-off-by: Anders Hustvedt <anders@computerfire.net>
-rw-r--r--Model01-Firmware.ino7
1 files changed, 5 insertions, 2 deletions
diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino
index 5fd75f8..a5363f0 100644
--- a/Model01-Firmware.ino
+++ b/Model01-Firmware.ino
@@ -291,11 +291,14 @@ static void versionInfoMacro(uint8_t keyState) {
static void anyKeyMacro(uint8_t keyState) {
static Key lastKey;
- if (keyToggledOn(keyState))
+ bool toggledOn = false;
+ if (keyToggledOn(keyState)) {
lastKey.keyCode = Key_A.keyCode + (uint8_t)(millis() % 36);
+ toggledOn = true;
+ }
if (keyIsPressed(keyState))
- kaleidoscope::hid::pressKey(lastKey);
+ kaleidoscope::hid::pressKey(lastKey, toggledOn);
}