From ab57ab84689b91a49ec875b34f75e62ed5ef2a28 Mon Sep 17 00:00:00 2001
From: Anders Hustvedt <anders@computerfire.net>
Date: Mon, 29 Oct 2018 06:09:15 -0600
Subject: Fix anyKeyMacro for new hid API

Signed-off-by: Anders Hustvedt <anders@computerfire.net>
---
 Model01-Firmware.ino | 7 +++++--
 1 file 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);
 }
 
 
-- 
cgit v1.2.3