vim: bug fix for mapping Caps as Ctrl in KDE

This commit is contained in:
Le Tan 2018-09-01 19:23:21 +08:00
parent 5d0b45715d
commit af912619a0
2 changed files with 8 additions and 2 deletions

View File

@ -569,7 +569,11 @@ bool VVim::handleKeyPressEvent(int key, int modifiers, int *p_autoIndentPos)
if (m_registerPending) {
// Ctrl and Shift may be sent out first.
if (key == Qt::Key_Control || key == Qt::Key_Shift || key == Qt::Key_Meta) {
if (key == Qt::Key_Control
|| key == Qt::Key_Shift
|| key == Qt::Key_Meta
// For mapping Caps as Ctrl in KDE.
|| key == Qt::Key_CapsLock) {
goto accept;
}

View File

@ -483,7 +483,9 @@ exit:
&& key != Qt::Key_Tab
&& key != Qt::Key_Backtab
&& key != Qt::Key_Shift
&& key != Qt::Key_Control) {
&& key != Qt::Key_Control
// For mapping Caps as Ctrl in KDE.
&& key != Qt::Key_CapsLock) {
m_autoIndentPos = -1;
}