make consumercontrol and systemcontrol events only fire on key release

rather than send key down events for a while before sending a key
release event as we did with the old scheme, this sends the events
paired together as "one shot". This is closer to the spec and what OSX
needs to accept these events
pull/152/head
Jesse Vincent 7 years ago
parent b6d552f9c0
commit 8bb9bb37ca
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -12,14 +12,14 @@ static bool handleSyntheticKeyswitchEvent(Key mappedKey, uint8_t keyState) {
return false;
} else if (mappedKey.flags & IS_CONSUMER) {
if (keyIsPressed(keyState)) {
kaleidoscope::hid::pressConsumerControl(mappedKey);
} else if (keyWasPressed(keyState)) {
kaleidoscope::hid::pressConsumerControl(mappedKey);
kaleidoscope::hid::releaseConsumerControl(mappedKey);
}
} else if (mappedKey.flags & IS_SYSCTL) {
if (keyIsPressed(keyState)) {
kaleidoscope::hid::pressSystemControl(mappedKey);
} else if (keyWasPressed(keyState)) {
kaleidoscope::hid::pressSystemControl(mappedKey);
kaleidoscope::hid::releaseSystemControl(mappedKey);
}
} else if (mappedKey.flags & SWITCH_TO_KEYMAP) {

Loading…
Cancel
Save