Merge pull request #21 from jamesnvc/allow-modifiers

Don't cancel one-shot if other key pressed is a modifier
pull/389/head
Gergely Nagy 7 years ago committed by GitHub
commit 5a8cae7c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -152,11 +152,13 @@ Key OneShot::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_st
// ordinary key here, with some event
if (keyIsPressed(key_state)) {
saveAsPrevious(mapped_key);
if (!isModifier(mapped_key)) {
if (should_mask_on_interrupt_)
KeyboardHardware.maskKey(row, col);
saveAsPrevious(mapped_key);
should_cancel_ = true;
}
}
return mapped_key;
}

Loading…
Cancel
Save