xterm cloning terminalemulators such as konsole and gnome-terminal have always had inconcistent esc-sequences for the home and end keys. Back in the 6.2 / 7.x days I worked with RedHat to make them al behave identical/concistent. Back then we decioded to follow the debian keyboard guidelines for home and end. In the current FC2 state there are 2 problems with home and end when used form xterm clones. 1) there is no terminfo entry for these keys in the xterm terminfo entry, see bug 122815 2) xterm still sends the debiankeyb guideline sequences for home and end, gnome-terminal gets its sequences from terminfo so once 1) is fixed gnome-terminal also behaves correct, but konsole has the wrong esc-sequences hardcoded in it. I'll attach a patch which fixes the esc-sequences for home and end, and also adds seperate esc-sequences for keypadkeys with a modifier (alt-home, alt-left, ctrl-right etc) this for example allows one todo ctrl-left or ctrl-right for word navigation in bash. I've also submitted this patch upstream, see: http://bugs.kde.org/show_bug.cgi?id=65067 This is worth the time to read! Note this patch replaces(incorperates) my earlier double-esc fix patch, because it was written to fix problems reported when merging the double-esc-patch upstream.
Created attachment 100705 [details] Patch fixing the described problems
Note that this bug was already fixed in the past see bug 63473, but has resurfaced because patches seem to be blindly dropped when going to newer upstream versions. (also see my rant in bug 122815)
Please don't apply my patch, because of changes which are the result of bug 122815 and the discussion there the attached patch now has the wrong esc-sequences for home and end. I'll write a new patch soon.
Hi Hans, ok i have disable your patch now and will enable it again when i get the new one ;-) thanks
Actually bug 122815 once resolved will also fix the home/end problem for konsole. Konsole then still needs work to be more xterm compatible, but that is another story and another bug. So I'm closing this. BTW I hope when you say you've dropped my patch you mean the patch I've attched to this bug, which indeed now is plain wrong, the double-esc patch is still needed.
do you mean this patch? --- kdebase-3.1.3/konsole/konsole/TEmuVt102.cpp.hdg 2003-09-26 23:51:33.000000000 +0200 +++ kdebase-3.1.3/konsole/konsole/TEmuVt102.cpp 2003-09-26 23:56:40.000000000 +0200 @@ -904,7 +904,10 @@ scr->setHistCursor(scr->getHistLines()); if (cmd==CMD_send) { - if ((ev->state() & AltButton) && !metaspecified ) sendString("\033"); + if ( (ev->state() & AltButton) && + !metaspecified && + !(len && txt[0]==27) ) + sendString("\033"); emit sndBlock(txt,len); return; }
Yes, That is the double-esc patch and is still needed. I'm trying to get it integrated upstream, but sofar this hasn't happened yet.
this patch is still in kdebase ;-)