1
0

Fix key repeat on Any. Port to new hid facade api

This commit is contained in:
Jesse Vincent 2017-07-25 15:14:07 -07:00
parent ddc4e15fbf
commit de97e9a2f4
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

View File

@ -101,9 +101,13 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
} else if (macroIndex == 1 && keyToggledOn(keyState)) {
Macros.type(PSTR("Keyboardio Model 01 - Kaleidoscope "));
Macros.type(PSTR(BUILD_INFORMATION));
} else if (macroIndex == MACRO_ANY && keyToggledOn(keyState)) {
Keyboard.press(Key_A.keyCode + (uint8_t)(millis() % 36));
Keyboard.sendReport();
} else if (macroIndex == MACRO_ANY) {
static Key lastKey;
if (keyToggledOn(keyState))
lastKey.keyCode = Key_A.keyCode + (uint8_t)(millis() % 36);
if (keyIsPressed(keyState))
kaleidoscope::hid::pressKey(lastKey);
}
return MACRO_NONE;
}