Revert "Support {MODE=VIRTUAL} on macOS"

This reverts commit 25fc69dcd4.
This commit is contained in:
Jonathan White 2023-05-13 15:48:06 -04:00
parent 74d96fc06f
commit 59042563b3
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01
2 changed files with 2 additions and 6 deletions

View File

@ -326,7 +326,7 @@ void AutoTypeSelectDialog::buildActionMenu()
submitAutoTypeMatch(match); submitAutoTypeMatch(match);
}); });
#if defined(Q_OS_WIN) || defined(Q_OS_MAC) #ifdef Q_OS_WIN
auto typeVirtualAction = new QAction(icons()->icon("auto-type"), tr("Use Virtual Keyboard"), nullptr); auto typeVirtualAction = new QAction(icons()->icon("auto-type"), tr("Use Virtual Keyboard"), nullptr);
m_actionMenu->insertAction(copyUsernameAction, typeVirtualAction); m_actionMenu->insertAction(copyUsernameAction, typeVirtualAction);
typeVirtualAction->setShortcut(Qt::CTRL + Qt::Key_4); typeVirtualAction->setShortcut(Qt::CTRL + Qt::Key_4);
@ -342,7 +342,7 @@ void AutoTypeSelectDialog::buildActionMenu()
typeUsernameAction->setShortcutVisibleInContextMenu(true); typeUsernameAction->setShortcutVisibleInContextMenu(true);
typePasswordAction->setShortcutVisibleInContextMenu(true); typePasswordAction->setShortcutVisibleInContextMenu(true);
typeTotpAction->setShortcutVisibleInContextMenu(true); typeTotpAction->setShortcutVisibleInContextMenu(true);
#if defined(Q_OS_WIN) || defined(Q_OS_MAC) #ifdef Q_OS_WIN
typeVirtualAction->setShortcutVisibleInContextMenu(true); typeVirtualAction->setShortcutVisibleInContextMenu(true);
#endif #endif
#endif #endif

View File

@ -250,10 +250,6 @@ AutoTypeAction::Result AutoTypeExecutorMac::execType(const AutoTypeKey* action)
int ch = action->character.toUpper().toLatin1(); int ch = action->character.toUpper().toLatin1();
m_platform->sendKey(static_cast<Qt::Key>(ch), true, action->modifiers); m_platform->sendKey(static_cast<Qt::Key>(ch), true, action->modifiers);
m_platform->sendKey(static_cast<Qt::Key>(ch), false, action->modifiers); m_platform->sendKey(static_cast<Qt::Key>(ch), false, action->modifiers);
} else if (mode == Mode::VIRTUAL) {
int ch = action->character.toLatin1();
m_platform->sendKey(static_cast<Qt::Key>(ch), true, action->modifiers);
m_platform->sendKey(static_cast<Qt::Key>(ch), false, action->modifiers);
} else { } else {
m_platform->sendChar(action->character, true); m_platform->sendChar(action->character, true);
m_platform->sendChar(action->character, false); m_platform->sendChar(action->character, false);