diff --git a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc index 31ba7cf46b8..569bfc3638f 100644 --- a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc +++ b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc @@ -351,7 +351,7 @@ \li Ctrl+0 \row \li Toggle Vim-style editing - \li Alt+V, Alt+V + \li Alt+Y, Alt+Y \row \li Split \li Ctrl+E, 2 @@ -517,7 +517,7 @@ \li Ctrl+Alt+Space \row \li Execute user actions in FakeVim mode - \li Alt+V, n, where n is the number of the user action, from 1 to 9 + \li Alt+Y, n, where n is the number of the user action, from 1 to 9 \endif \endtable diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index c46fbe4663e..ea0be66d54a 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -4353,10 +4353,15 @@ bool FakeVimHandler::Private::handleNoSubMode(const Input &input) } else if (input.is('C')) { handleAs("%1c$"); } else if (input.isControl('c')) { - if (isNoVisualMode()) - showMessage(MessageInfo, Tr::tr("Type Alt-V, Alt-V to quit FakeVim mode.")); - else + if (isNoVisualMode()) { +#if defined(Q_OS_MACOS) + showMessage(MessageInfo, Tr::tr("Type Meta-Shift-Y, Meta-Shift-Y to quit FakeVim mode.")); +#else + showMessage(MessageInfo, Tr::tr("Type Alt-Y, Alt-Y to quit FakeVim mode.")); +#endif + } else { leaveVisualMode(); + } } else if ((input.is('d') || input.is('x') || input.isKey(Key_Delete)) && isVisualMode()) { cutSelectedText(); diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index e3499193725..35225ab3517 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -1196,7 +1196,8 @@ bool FakeVimPluginPrivate::initialize() Command *cmd = nullptr; cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim)->action(), INSTALL_HANDLER, Context(Core::Constants::C_GLOBAL), true); - cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+Y,Meta+Shift+Y") + : Tr::tr("Alt+Y,Alt+Y"))); ActionContainer *advancedMenu = ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED); @@ -1207,7 +1208,8 @@ bool FakeVimPluginPrivate::initialize() auto act = new QAction(this); act->setText(Tr::tr("Execute User Action #%1").arg(i)); cmd = ActionManager::registerAction(act, base.withSuffix(i)); - cmd->setDefaultKeySequence(QKeySequence((useMacShortcuts ? Tr::tr("Meta+Shift+V,%1") : Tr::tr("Alt+V,%1")).arg(i))); + cmd->setDefaultKeySequence(QKeySequence((useMacShortcuts ? Tr::tr("Meta+Shift+Y,%1") + : Tr::tr("Alt+Y,%1")).arg(i))); connect(act, &QAction::triggered, this, [this, i] { userActionTriggered(i); }); }