diff options
author | Gergely Nagy <algernon@users.noreply.github.com> | 2018-10-30 07:03:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 07:03:06 +0100 |
commit | ab471273bc69c5243032d6e39451b2424ff57d1e (patch) | |
tree | 5d22a993ac4ebac7fefcec0ba8367e58e5c324bb | |
parent | a963b8074e72d05b231ac7af65b897fa405cbc58 (diff) | |
parent | ab57ab84689b91a49ec875b34f75e62ed5ef2a28 (diff) | |
download | model01-firmware-ab471273bc69c5243032d6e39451b2424ff57d1e.tar.gz model01-firmware-ab471273bc69c5243032d6e39451b2424ff57d1e.tar.bz2 model01-firmware-ab471273bc69c5243032d6e39451b2424ff57d1e.zip |
Merge pull request #68 from hustvedt/fix-any
Fix anyKeyMacro for new hid API
-rw-r--r-- | Model01-Firmware.ino | 7 |
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); } |