Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Sep 2014 16:54:49 -0400
From:      Thomas Dickey <dickey@his.com>
To:        Victor Sudakov <vas@mpeks.tomsk.su>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: xterm, screen and the "Home" and "End" keys
Message-ID:  <20140903205449.GB3259@aerie.jexium-island.net>
In-Reply-To: <20140903144836.GA14568@admin.sibptus.tomsk.ru>
References:  <20140902132318.GA86135@admin.sibptus.tomsk.ru> <20140903144836.GA14568@admin.sibptus.tomsk.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--GRPZ8SYKNexpdSJ7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 03, 2014 at 09:48:36PM +0700, Victor Sudakov wrote:
> Victor Sudakov wrote:
> >=20
> > Could you please help me solve the problem with screen or xterm?
> >=20
> >  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)=20
> > which is correct.
> >=20
> > 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.
> >=20
> > The "End" key has the same problem.
> >=20
>=20
> I think I have solved the problem by redefining what xterm is sending.
> In ~/.Xresources
>=20
> XTerm*VT100.translations: #override \n\
>         <Key>Home: string(0x1b) string("[1~") \n \
>         <Key>End: string(0x1b) string("[4~") \n
>=20
> Rather ugly, isn't it.

alternatively:

	XTerm*VT100.keyboardType: vt220

--=20
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net

--GRPZ8SYKNexpdSJ7
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAlQHgBkACgkQcCNT4PfkjtuKPQCgg/zU7NBbZE6VibcxZmPD1R10
5GwAnAyoiawlvZ+ocoatcOZKGYV7IV3+
=m5SP
-----END PGP SIGNATURE-----

--GRPZ8SYKNexpdSJ7--



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