diff --git a/src/vexplorer.cpp b/src/vexplorer.cpp index a3f35c98..ba21f482 100644 --- a/src/vexplorer.cpp +++ b/src/vexplorer.cpp @@ -12,6 +12,7 @@ #include "vlineedit.h" #include "vhistorylist.h" #include "vorphanfile.h" +#include "utils/vimnavigationforwidget.h" extern VMainWindow *g_mainWin; @@ -773,3 +774,12 @@ void VExplorer::setRootDirectory(const QString &p_path) setCurrentEntry(idx); } } + +void VExplorer::keyPressEvent(QKeyEvent *p_event) +{ + if (VimNavigationForWidget::injectKeyPressEventForVim(m_tree, p_event)) { + return; + } + + QWidget::keyPressEvent(p_event); +} diff --git a/src/vexplorer.h b/src/vexplorer.h index d681a178..b28c7610 100644 --- a/src/vexplorer.h +++ b/src/vexplorer.h @@ -28,6 +28,8 @@ protected: void focusInEvent(QFocusEvent *p_event) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *p_event) Q_DECL_OVERRIDE; + private slots: void handleEntryActivated(int p_idx);