Commit 1896d2cc authored by Christian Stenger's avatar Christian Stenger
Browse files

FakeVim: Change default keyboard sequence for FakeVim...



...on OSX to make it possible to enter and leave with the same
shortcut. Adjust user command mapping as well to be able to
execute these from inside FakeVim mode as well.

Task-number: QTCREATORBUG-14082
Change-Id: Ib93f798a61b4ed16db7cca7b3c927e1fb6bd5d0f
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent b9ab6b3f
......@@ -1197,7 +1197,7 @@ bool FakeVimPluginPrivate::initialize()
Command *cmd = 0;
cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim),
INSTALL_HANDLER, globalcontext, true);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? Tr::tr("Meta+V,Meta+V") : Tr::tr("Alt+V,Alt+V")));
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V")));
ActionContainer *advancedMenu =
ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED);
......@@ -1208,7 +1208,7 @@ 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+V,%1") : Tr::tr("Alt+V,%1")).arg(i)));
cmd->setDefaultKeySequence(QKeySequence((UseMacShortcuts ? Tr::tr("Meta+Shift+V,%1") : Tr::tr("Alt+V,%1")).arg(i)));
connect(act, &QAction::triggered, this, [this, i] { userActionTriggered(i); });
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment