Commit 1ef66857 authored by Lukas Holecek's avatar Lukas Holecek Committed by hjk
Browse files

FakeVim: Allow to remap shortcuts



Allows to remap main window shortcuts with command for passing keys.

    noremap <C-S> ,<C-S>
    noremap ZZ ,<C-S>,<C-W>
    noremap f<C-O> ,<C-O>
    noremap f<C-F> ,<C-F>

Task-number: QTCREATORBUG-14413
Change-Id: Ib86637d55223b1f4ce31a88c1c7ae2e05cb2aff1
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 8211e6a0
......@@ -2790,6 +2790,14 @@ bool FakeVimHandler::Private::handleCommandBufferPaste(const Input &input)
EventResult FakeVimHandler::Private::handleDefaultKey(const Input &input)
{
if (g.passing) {
passShortcuts(false);
QKeyEvent event(QEvent::KeyPress, input.key(), input.modifiers(), input.text());
bool accepted = QApplication::sendEvent(editor()->window(), &event);
if (accepted || (!m_textedit && !m_plaintextedit))
return EventHandled;
}
if (input == Nop)
return EventHandled;
else if (g.subsubmode == SearchSubSubMode)
......
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