From fc6851824cd8cab010eef90887bc721f950381e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= <aumuell@reserv.at> Date: Thu, 18 Mar 2010 13:15:59 +0100 Subject: [PATCH] fakevim: handle ctrl-[ and ctrl-] in the same way as letters with control modifier Merge-request: 131 Reviewed-by: hjk <qtc-committer@nokia.com> --- src/plugins/fakevim/fakevimhandler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 7d0cd8c867d..b45d1510dbe 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -589,7 +589,7 @@ bool FakeVimHandler::Private::wantsOverride(QKeyEvent *ev) const int mods = ev->modifiers(); KEY_DEBUG("SHORTCUT OVERRIDE" << key << " PASSING: " << m_passing); - if (key == Key_Escape || (mods == Qt::ControlModifier && key == Key_BracketLeft)) { + if (key == Key_Escape) { // Not sure this feels good. People often hit Esc several times if (isNoVisualMode() && m_mode == CommandMode) return false; @@ -597,7 +597,9 @@ bool FakeVimHandler::Private::wantsOverride(QKeyEvent *ev) } // We are interested in overriding most Ctrl key combinations - if (mods == Qt::ControlModifier && key >= Key_A && key <= Key_Z && key != Key_K) { + if (mods == Qt::ControlModifier + && ((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 if (m_passing) { KEY_DEBUG(" PASSING CTRL KEY"); -- GitLab