diff --git a/src/plugins/fakevim/fakevimactions.cpp b/src/plugins/fakevim/fakevimactions.cpp
index a17fbe146c1..6637a171cf6 100644
--- a/src/plugins/fakevim/fakevimactions.cpp
+++ b/src/plugins/fakevim/fakevimactions.cpp
@@ -217,6 +217,13 @@ FakeVimSettings *theFakeVimSettings()
item->setCheckable(true);
instance->insertItem(ConfigShowMarks, item, _("showmarks"), _("sm"));
+ item = new SavedAction(instance);
+ item->setDefaultValue(false);
+ item->setValue(false);
+ item->setSettingsKey(group, _("PassControlKey"));
+ item->setCheckable(true);
+ instance->insertItem(ConfigPassControlKey, item, _("passcontrolkey"), _("pck"));
+
return instance;
}
diff --git a/src/plugins/fakevim/fakevimactions.h b/src/plugins/fakevim/fakevimactions.h
index 3ff9c5c587b..3b3a78bce60 100644
--- a/src/plugins/fakevim/fakevimactions.h
+++ b/src/plugins/fakevim/fakevimactions.h
@@ -66,6 +66,7 @@ enum FakeVimSettingsCode
// other actions
ConfigShowMarks,
+ ConfigPassControlKey
};
class FakeVimSettings : public QObject
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index b431a33a234..1e83636f04b 100644
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -1027,8 +1027,9 @@ bool FakeVimHandler::Private::wantsOverride(QKeyEvent *ev)
return true;
}
- // We are interested in overriding most Ctrl key combinations
+ // We are interested in overriding most Ctrl key combinations
if (mods == Qt::ControlModifier
+ && !config(ConfigPassControlKey).toBool()
&& ((key >= Key_A && key <= Key_Z && key != Key_K)
|| key == Key_BracketLeft || key == Key_BracketRight)) {
// Ctrl-K is special as it is the Core's default notion of Locator
diff --git a/src/plugins/fakevim/fakevimoptions.ui b/src/plugins/fakevim/fakevimoptions.ui
index 992455cd75a..2445c6eb52b 100644
--- a/src/plugins/fakevim/fakevimoptions.ui
+++ b/src/plugins/fakevim/fakevimoptions.ui
@@ -7,7 +7,7 @@
0
0
472
- 420
+ 421
@@ -80,6 +80,16 @@
+ -
+
+
+ Checking this box passes key sequences like Ctrl-S to the Creator core instead of interpreting them in FakeVim. This gives easier access to Creator core functionality at the price of losing some features of FakeVim.
+
+
+ Pass control key
+
+
+
-
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 34631c52793..f377d465391 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -183,6 +183,8 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
m_group.insert(theFakeVimSetting(ConfigIsKeyword),
m_ui.lineEditIsKeyword);
+ m_group.insert(theFakeVimSetting(ConfigPassControlKey),
+ m_ui.checkBoxPassControlKey);
m_group.insert(theFakeVimSetting(ConfigAutoIndent),
m_ui.checkBoxAutoIndent);
m_group.insert(theFakeVimSetting(ConfigSmartIndent),
@@ -204,6 +206,7 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
<< ' ' << m_ui.checkBoxExpandTab->text()
<< ' ' << m_ui.checkBoxShowMarks->text()
<< ' ' << m_ui.checkBoxSmartIndent->text()
+ << ' ' << m_ui.checkBoxPassControlKey->text()
<< ' ' << m_ui.checkBoxHlSearch->text()
<< ' ' << m_ui.checkBoxIncSearch->text()
<< ' ' << m_ui.checkBoxSmartTab->text()