Merge pull request #238 from ejinks4/patch-1

Update key_events.cpp (IS_INTERNAL Handling)

I'm merging this for now, even though I know it's not the 'right' solution. But I'd like Mute to work correctly for MP2 keyboards and we're on deadline
pull/248/head
Jesse Vincent 7 years ago committed by GitHub
commit c0407b2775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,9 +8,7 @@ static bool handleSyntheticKeyswitchEvent(Key mappedKey, uint8_t keyState) {
if (!(mappedKey.flags & SYNTHETIC))
return false;
if (mappedKey.flags & IS_INTERNAL) {
return false;
} else if (mappedKey.flags & IS_CONSUMER) {
if (mappedKey.flags & IS_CONSUMER) {
if (keyIsPressed(keyState)) {
} else if (keyWasPressed(keyState)) {
kaleidoscope::hid::pressConsumerControl(mappedKey);
@ -22,6 +20,8 @@ static bool handleSyntheticKeyswitchEvent(Key mappedKey, uint8_t keyState) {
kaleidoscope::hid::pressSystemControl(mappedKey);
kaleidoscope::hid::releaseSystemControl(mappedKey);
}
} else if (mappedKey.flags & IS_INTERNAL) {
return false;
} else if (mappedKey.flags & SWITCH_TO_KEYMAP) {
// Should not happen, handled elsewhere.
}

Loading…
Cancel
Save