Version: (using KDE 4.3.3) OS: Linux Installed from: Ubuntu Packages A 104-key PC keyboard has a 'numeric keypad' section that produces digits when NumLock is on, and cursor movement keys (arrows etc) when NumLock is off. This keypad does not work under konsole when NumLock is off - the keys are just ignored (unless you hold a modifier like shift or alt). Tested this on two x86-64 Linux boxes (one is a generic PC desktop and another is a Toshiba laptop). Expected behavior: when NumLock is off, these keys should produce the same escape sequences as the PC XT cursor movement keys. Using a recipe found in someone's blog, I fixed this for myself by the patch included below. This is applied to the file 'default.keytab' found in /usr/share/kde4/apps/konsole upon installation. --- default.keytab 2009-02-18 19:28:38.000000000 +0300 +++ my.keytab 2009-11-01 21:45:08.000000000 +0300 @@ -83,6 +83,27 @@ #key * +KeyPad+AppKeyPad : "\EOM" #key Enter +KeyPad+AppKeyPad : "\r" +# Keypad keys with NumLock Off +key Up -Shift+Ansi+AppCuKeys+KeyPad : "\EOA" +key Down -Shift+Ansi+AppCuKeys+KeyPad : "\EOB" +key Right -Shift+Ansi+AppCuKeys+KeyPad : "\EOC" +key Left -Shift+Ansi+AppCuKeys+KeyPad : "\EOD" + +key Up -Shift+Ansi-AppCuKeys+KeyPad : "\E[A" +key Down -Shift+Ansi-AppCuKeys+KeyPad : "\E[B" +key Right -Shift+Ansi-AppCuKeys+KeyPad : "\E[C" +key Left -Shift+Ansi-AppCuKeys+KeyPad : "\E[D" + +key Home +AppCuKeys+KeyPad : "\EOH" +key End +AppCuKeys+KeyPad : "\EOF" +key Home -AppCuKeys+KeyPad : "\E[H" +key End -AppCuKeys+KeyPad : "\E[F" + +key Insert +KeyPad : "\E[2~" +key Delete +KeyPad : "\E[3~" +key Prior -Shift+KeyPad : "\E[5~" +key Next -Shift+KeyPad : "\E[6~" + # other grey PC keys key Enter+NewLine : "\r\n"
I added these entries to the default keyboard layout at some point but discovered that it caused problems with Vim. My notes from the code change were: Disable application keypad support in the default key bindings file as, although it produces the correct key codes as tested using 'vttest', it breaks Vim - which enables application key pad by default. BUG:183076 CCBUG:170220
(In reply to comment #1) > I added these entries to the default keyboard layout at some point but > discovered that it caused problems with Vim. Those entries were for the case of numlock ON if I understand correctly. What I added is for numlock OFF, and the codes are the same as for ordinary arrow keys. I tried to run vim with my customized keytab file and did not observe symptoms described in Bug 183076. (However I am not a vi user and cannot tell vi bugs from features.)
*** Bug 189116 has been marked as a duplicate of this bug. ***
*** Bug 187110 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 169012 ***