forked from qt-creator/qt-creator
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: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -1197,7 +1197,7 @@ bool FakeVimPluginPrivate::initialize()
|
|||||||
Command *cmd = 0;
|
Command *cmd = 0;
|
||||||
cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim),
|
cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim),
|
||||||
INSTALL_HANDLER, globalcontext, true);
|
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 =
|
ActionContainer *advancedMenu =
|
||||||
ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
||||||
@@ -1208,7 +1208,7 @@ bool FakeVimPluginPrivate::initialize()
|
|||||||
auto act = new QAction(this);
|
auto act = new QAction(this);
|
||||||
act->setText(Tr::tr("Execute User Action #%1").arg(i));
|
act->setText(Tr::tr("Execute User Action #%1").arg(i));
|
||||||
cmd = ActionManager::registerAction(act, base.withSuffix(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); });
|
connect(act, &QAction::triggered, this, [this, i] { userActionTriggered(i); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user