masking: Let the release event of a masked key through

When a masked key is released, instead of unmasking it and returning, unmask it
and let the event through. This fixes keyboardio/Kaleidoscope-OneShot#10.

Reported-by: Craig Disselkoen
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/156/head
Gergely Nagy 7 years ago
parent bb96bbb438
commit dc40c8e226

@ -58,9 +58,10 @@ void handleKeyswitchEvent(Key mappedKey, byte row, byte col, uint8_t keyState) {
if (KeyboardHardware.isKeyMasked(row, col)) { if (KeyboardHardware.isKeyMasked(row, col)) {
if (keyToggledOff(keyState)) { if (keyToggledOff(keyState)) {
KeyboardHardware.unMaskKey(row, col); KeyboardHardware.unMaskKey(row, col);
} } else {
return; return;
} }
}
for (byte i = 0; Kaleidoscope.eventHandlers[i] != NULL && i < HOOK_MAX; i++) { for (byte i = 0; Kaleidoscope.eventHandlers[i] != NULL && i < HOOK_MAX; i++) {
Kaleidoscope_::eventHandlerHook handler = Kaleidoscope.eventHandlers[i]; Kaleidoscope_::eventHandlerHook handler = Kaleidoscope.eventHandlers[i];

Loading…
Cancel
Save