Switch Macros to use an API rather than doing its own bitmath

pull/365/head
Jesse Vincent 8 years ago
parent 66ff95877d
commit 6b850c140d
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -12,11 +12,11 @@ static void readKeyCodeAndPlay(const macro_t *macro_p, uint8_t flags, uint8_t ke
key.flags = flags; key.flags = flags;
key.keyCode = pgm_read_byte(macro_p++); key.keyCode = pgm_read_byte(macro_p++);
if (keyStates & IS_PRESSED) { if (keyIsPressed(keyStates)) {
handleKeyswitchEvent(key, UNKNOWN_KEYSWITCH_LOCATION, IS_PRESSED | INJECTED); handleKeyswitchEvent(key, UNKNOWN_KEYSWITCH_LOCATION, IS_PRESSED | INJECTED);
Keyboard.sendReport(); Keyboard.sendReport();
} }
if (keyStates & WAS_PRESSED) { if (keyWasPressed(keyStates)) {
handleKeyswitchEvent(key, UNKNOWN_KEYSWITCH_LOCATION, WAS_PRESSED | INJECTED); handleKeyswitchEvent(key, UNKNOWN_KEYSWITCH_LOCATION, WAS_PRESSED | INJECTED);
Keyboard.sendReport(); Keyboard.sendReport();
} }

Loading…
Cancel
Save