aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGergely Nagy <algernon@users.noreply.github.com>2018-10-30 07:03:06 +0100
committerGitHub <noreply@github.com>2018-10-30 07:03:06 +0100
commitab471273bc69c5243032d6e39451b2424ff57d1e (patch)
tree5d22a993ac4ebac7fefcec0ba8367e58e5c324bb
parenta963b8074e72d05b231ac7af65b897fa405cbc58 (diff)
parentab57ab84689b91a49ec875b34f75e62ed5ef2a28 (diff)
downloadModel01-Firmware-ab471273bc69c5243032d6e39451b2424ff57d1e.tar.gz
Model01-Firmware-ab471273bc69c5243032d6e39451b2424ff57d1e.zip
Merge pull request #68 from hustvedt/fix-any
Fix anyKeyMacro for new hid API
-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);
}