Fix anyKeyMacro for new hid API
Signed-off-by: Anders Hustvedt <anders@computerfire.net>
This commit is contained in:
parent
a963b8074e
commit
ab57ab8468
@ -291,11 +291,14 @@ static void versionInfoMacro(uint8_t keyState) {
|
|||||||
|
|
||||||
static void anyKeyMacro(uint8_t keyState) {
|
static void anyKeyMacro(uint8_t keyState) {
|
||||||
static Key lastKey;
|
static Key lastKey;
|
||||||
if (keyToggledOn(keyState))
|
bool toggledOn = false;
|
||||||
|
if (keyToggledOn(keyState)) {
|
||||||
lastKey.keyCode = Key_A.keyCode + (uint8_t)(millis() % 36);
|
lastKey.keyCode = Key_A.keyCode + (uint8_t)(millis() % 36);
|
||||||
|
toggledOn = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (keyIsPressed(keyState))
|
if (keyIsPressed(keyState))
|
||||||
kaleidoscope::hid::pressKey(lastKey);
|
kaleidoscope::hid::pressKey(lastKey, toggledOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user