From owner-freebsd-questions@FreeBSD.ORG Wed Sep 3 20:55:17 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 118C87AF for ; Wed, 3 Sep 2014 20:55:17 +0000 (UTC) Received: from vms173015pub.verizon.net (vms173015pub.verizon.net [206.46.173.15]) by mx1.freebsd.org (Postfix) with ESMTP id DD9F513DB for ; Wed, 3 Sep 2014 20:55:16 +0000 (UTC) Received: from localhost.localdomain ([unknown] [96.255.142.83]) by vms173015.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0NBC00CXUFFE1MC0@vms173015.mailsrvcs.net> for freebsd-questions@freebsd.org; Wed, 03 Sep 2014 15:54:55 -0500 (CDT) Received: from localhost.localdomain (aerie [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3/Debian-9.4) with ESMTP id s83KsnX9003506 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 03 Sep 2014 16:54:49 -0400 Received: (from tom@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id s83Ksn9e003505; Wed, 03 Sep 2014 16:54:49 -0400 Date: Wed, 03 Sep 2014 16:54:49 -0400 From: Thomas Dickey To: Victor Sudakov Subject: Re: xterm, screen and the "Home" and "End" keys Message-id: <20140903205449.GB3259@aerie.jexium-island.net> Reply-to: dickey@his.com References: <20140902132318.GA86135@admin.sibptus.tomsk.ru> <20140903144836.GA14568@admin.sibptus.tomsk.ru> MIME-version: 1.0 Content-type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary=GRPZ8SYKNexpdSJ7 Content-disposition: inline In-reply-to: <20140903144836.GA14568@admin.sibptus.tomsk.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 20:55:17 -0000 --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\ > Home: string(0x1b) string("[1~") \n \ > End: string(0x1b) string("[4~") \n >=20 > Rather ugly, isn't it. alternatively: XTerm*VT100.keyboardType: vt220 --=20 Thomas E. Dickey 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--