Monday, February 02, 2009

How to get Konsole 4.2 to behave?

Dear lazyweb: My Konsole in KDE 4.2 does not like me. Let me explain myself, i like to use vim for quick text editing and i like using the numeric keypad to type numbers, if i use the "Default (XFree 4)" input method, that doesn't work, and pressing any keypad number makes vim go nuts, so i'm using the "Linux Console" input method.

"Linux Console" works correctly when on a local session but if i log into a remote machine using ssh, then suddenly the Home and End keys start outputing ~ characters. And this all does not happen in xterm so it must be a konsole feature, any idea how can i get rid of it?


George Hron said...

I ran into it too... that's really weird :s

it's seems some similar problem like putty's on windows if Application numpad enabled.

Thomas said...

When you find a solution, let me know :)

Robert Knight said...

Hi folks,

Konsole in KDE 4.2 has application keypad support. What I didn't know is that you have to disable this feature for the keypad to work in Vim (or maybe there is a Vim setting somewhere).

Either way, you can work around this in Konsole by editing the default key binding (Settings -> Edit Current Profile -> Input -> Edit) and deleting all the 'KeyPad+AppKeyPad' entries at the top of the list.

Given this affects Vim (which is pretty important) I think I'll just delete those entries from the default key binding file.

George Hron said...

Robert, very-very thanks. It's works with svn/trunk KDE too.

Anonymous said...

Konsole does not like "emacs -nw" neither: Ctrl+Space used to set a mark for selection (and very frequently used) just display a space, no mark... any idea on how to fix this ? :(
(can't figure out which output to give for this key binding in "input settings"...).

Particlese said...

That "KeyPad+AppKeyPad" fix also unborks nano's keypad support, though another fix for nano is to put "set rebindkeypad" in .nanorc. A potential downside to the .nanorc fix is that it disables some sort of mouse input.

Anyway, thanks for the konsole fix!

Eelko Berkenpies said...

Finally! Thanks for the advice Robert Knight. That did the trick for me too. I was having the same problem.

Thanks again! :)

balinares said...

Hi Albert,

Yeah, known issue: it seems Konsole does silly things with its terminal settings.

How to solve, AFAIK:

1) Settings > Edit current profile > Input tab: select 'Linux console'.

2) Settings > Edit current profile > General tab > Environment: Edit. Add the line 'TERM=linux'.

That way, Konsole is set up for the correct(?) behavior and advertises it correctly. Works for me, anyway.

Anonymous said...

Thanks. Setting 'TERM=linux' worked perfectly

kabel said...

Nice catch! While you're on a roll, here's one for you:

Ctrl-Arrow skips words on the CLI. This is good.
Ctrl-Arrow outputs ;5D in the MySQL CLI. This is bad. Also, it does this locally, but if I ssh to another machine and use the MySQL CLI there, it skips words. This, too, is good.

Any thoughts? I've googled all over the place, but all I found were some .inputrc tweaks that didn't fix anything.

(Yes, I realize I'm an annoying "great job, now fix my problem" commenter, but this is the closest thing I've found so far)

shulhan said...

see bug-169012

from the attachment you can see how to solve this issue.

example to solve this in my system (Sabayon KDE 4.2.4, Konsole v2.2.3),

$ echo "key Home+AppCuKeys+KeyPad : \"\EOH\"" >> ~/.kde4.2/share/apps/konsole/default.keytab

BTW, please vote to that bug, pretty please.