From 0b5b7ef67a15b3c0ef5d92c1f4020998a7261549 Mon Sep 17 00:00:00 2001 From: Jakub Golebiewski Date: Mon, 14 Sep 2015 21:58:17 +0200 Subject: [PATCH] FakeVim: Fix caps lock in macros. This fixes the bug that while recording a macrom, hitting caps lock (scroll lock, num lock) inserts some key into the buffer (for caps '$') so when you replay the macro you get incorrect output. Other keys that are not in vimKeyNames may behave similarly but It is important that macros support those three (especially caps lock). Change-Id: I2854266f86a22e9d38fb1c6c5d923b11a56a5995 Reviewed-by: hjk --- src/plugins/fakevim/fakevimhandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 48b3f012695..2da69142473 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -856,7 +856,11 @@ static const QMap &vimKeyNames() { _("KDIVIDE"), Key_Slash }, { _("KMULTIPLY"), Key_Asterisk }, { _("KENTER"), Key_Enter }, - { _("KPOINT"), Key_Period } + { _("KPOINT"), Key_Period }, + + { _("CAPS"), Key_CapsLock }, + { _("NUM"), Key_NumLock }, + { _("SCROLL"), Key_ScrollLock } }; return k;