|
|
@ -55,14 +55,10 @@ EventHandlerResult TopsyTurvy::onKeyswitchEvent(Key &mapped_key, byte row, byte
|
|
|
|
return EventHandlerResult::OK;
|
|
|
|
return EventHandlerResult::OK;
|
|
|
|
|
|
|
|
|
|
|
|
// invert the shift state
|
|
|
|
// invert the shift state
|
|
|
|
|
|
|
|
|
|
|
|
if (!mod_state_) {
|
|
|
|
if (!mod_state_) {
|
|
|
|
if (keyIsPressed(key_state))
|
|
|
|
mapped_key.raw = mapped_key.raw - ranges::TT_FIRST;
|
|
|
|
hid::pressRawKey(Key_LeftShift);
|
|
|
|
mapped_key.flags |= SHIFT_HELD;
|
|
|
|
handleKeyswitchEvent(new_key, row, col, key_state | TOPSYTURVY | INJECTED);
|
|
|
|
return EventHandlerResult::OK;
|
|
|
|
hid::sendKeyboardReport();
|
|
|
|
|
|
|
|
if (keyToggledOff(key_state))
|
|
|
|
|
|
|
|
hid::releaseRawKey(Key_LeftShift);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
hid::releaseRawKey(Key_LeftShift);
|
|
|
|
hid::releaseRawKey(Key_LeftShift);
|
|
|
|
hid::releaseRawKey(Key_RightShift);
|
|
|
|
hid::releaseRawKey(Key_RightShift);
|
|
|
|