Merge pull request #251 from keyboardio/h/consumercontrol/repeat-fix

Fix ConsumerControl repeating
pull/252/head
Jesse Vincent 7 years ago committed by GitHub
commit 8e03280e36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,6 +63,7 @@ void releaseRawKey(Key mappedKey) {
void releaseAllKeys() { void releaseAllKeys() {
Keyboard.releaseAll(); Keyboard.releaseAll();
ConsumerControl.releaseAll();
} }
void releaseKey(Key mappedKey) { void releaseKey(Key mappedKey) {
@ -99,6 +100,7 @@ uint8_t getKeyboardLEDs() {
void sendKeyboardReport() { void sendKeyboardReport() {
Keyboard.sendReport(); Keyboard.sendReport();
ConsumerControl.sendReport();
} }
void initializeConsumerControl() { void initializeConsumerControl() {

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

Loading…
Cancel
Save