Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Sep 2014 21:48:36 +0700
From:      Victor Sudakov <vas@mpeks.tomsk.su>
To:        freebsd-questions@freebsd.org
Subject:   Re: xterm, screen and the "Home" and "End" keys
Message-ID:  <20140903144836.GA14568@admin.sibptus.tomsk.ru>
In-Reply-To: <20140902132318.GA86135@admin.sibptus.tomsk.ru>
References:  <20140902132318.GA86135@admin.sibptus.tomsk.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Victor Sudakov wrote:
> 
> Could you please help me solve the problem with screen or xterm?
> 
>  From a FreeBSD 9.3 xterm I ssh to a remote host. The "Home" key sends
> (and the remote application receives) "0x1B 0x5B 0x48" (ESC [ H) 
> which is correct.
> 
> However, if I start screen on the remote host, the application within
> the screen's virtual terminal receives "0x1B 0x4F 0x48" for "Home"
> which is "ESC O H". It results im the "Home" and key not working
> correctly in vim etc.
> 
> The "End" key has the same problem.
> 

I think I have solved the problem by redefining what xterm is sending.
In ~/.Xresources

XTerm*VT100.translations: #override \n\
        <Key>Home: string(0x1b) string("[1~") \n \
        <Key>End: string(0x1b) string("[4~") \n

Rather ugly, isn't it.


-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov@sibptus.tomsk.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140903144836.GA14568>