forked from qt-creator/qt-creator
fakevim: fix recognition of CTRL+R
This commit is contained in:
@@ -314,11 +314,13 @@ bool FakeVimHandler::Private::handleEvent(QKeyEvent *ev)
|
|||||||
if (m_fakeEnd)
|
if (m_fakeEnd)
|
||||||
m_tc.movePosition(Right, MoveAnchor, 1);
|
m_tc.movePosition(Right, MoveAnchor, 1);
|
||||||
|
|
||||||
if (key >= Key_A && key <= Key_Z
|
if ((ev->modifiers() & Qt::ControlModifier) != 0) {
|
||||||
&& (ev->modifiers() & Qt::ShiftModifier) == 0)
|
|
||||||
key += 32;
|
|
||||||
if ((ev->modifiers() & Qt::ControlModifier) != 0)
|
|
||||||
key += 256;
|
key += 256;
|
||||||
|
key += 32; // make it lower case
|
||||||
|
} else if (key >= Key_A && key <= Key_Z
|
||||||
|
&& (ev->modifiers() & Qt::ShiftModifier) == 0) {
|
||||||
|
key += 32;
|
||||||
|
}
|
||||||
bool handled = handleKey(key, ev->text());
|
bool handled = handleKey(key, ev->text());
|
||||||
|
|
||||||
// We fake vi-style end-of-line behaviour
|
// We fake vi-style end-of-line behaviour
|
||||||
|
|||||||
Reference in New Issue
Block a user