From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.devel Subject: Re: xterm [menu] key definition Date: Wed, 25 Aug 2021 12:47:17 +0200 Message-ID: <20210825104717.GA22741@tuxteam.de> References: <20210819024728.kgnf6jmpakqdto4p.ref@Ergus> <20210819024728.kgnf6jmpakqdto4p@Ergus> <87mtp71i4s.fsf@mail.linkov.net> <20210824081906.lg2qt4z2snhaxnjv@Ergus> <20210824083433.GC17209@tuxteam.de> <20210824091741.heeyge3xhufujkd7@Ergus> <20210824110014.GA28734@tuxteam.de> <20210824153003.d5oakoawkqwke2yb@Ergus> <20210825070640.GB11313@tuxteam.de> <20210825093212.jliurmm3j2x7yvyk@Ergus> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xHFwDpU9dbj6ez1V" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40033"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 25 12:55:50 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIqZS-000ABU-Bz for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Aug 2021 12:55:50 +0200 Original-Received: from localhost ([::1]:35984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIqZR-0001Iy-Cr for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Aug 2021 06:55:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIqRP-0002mq-F4 for emacs-devel@gnu.org; Wed, 25 Aug 2021 06:47:31 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:40412) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1mIqRK-0004Ny-8L for emacs-devel@gnu.org; Wed, 25 Aug 2021 06:47:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Bu8CCVSfhNCruu/kF8W0J/7CXK6ArP+PKGS8WGmU6Ew=; b=f2ETSEYW5TrnCg0VZYlu5wygaeQt3SfFHrz0o1hO9sEO/wASIA3vCjjNVfdMTIBFVjfxSFKdAT7R8r6XOyATnLU8/G6AG5C8jjxEz8owBRtVemcr4GTFd1jlAIWFDuHCk2N8lOZ1IX3ilrB6nL0HGznYNa1rCU+ceqjRfDRP5+LN6bN/h5CDv1Ru3VPBSjfWWO2+MTC1+/zRfIiTr3EMJqDJaJL22/CAIpc1UbjXSCC0Ip1ZZ+npIxqK3WzB3ejjZwGTT9G8xC9GaSEk7NTakzY2jyYbZr7dFePFOczi8Zh8QqB2r8WoiLce1eseG5728WEa8UVmRNNoYgt2hmYfdQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1mIqRB-0006NQ-Hm; Wed, 25 Aug 2021 12:47:17 +0200 Content-Disposition: inline In-Reply-To: <20210825093212.jliurmm3j2x7yvyk@Ergus> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272959 Archived-At: --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 25, 2021 at 11:32:12AM +0200, Ergus wrote: > On Wed, Aug 25, 2021 at 09:06:40AM +0200, tomas@tuxteam.de wrote: [...] > >I wouldn't expect an "xterm API". The "API" are the escape sequences :) > > > I meant an api to ask xterm about modifyFunctionKeys value for a general > solution. I see. > For this specific case kf16=3D\E[29~ unconditionally; so we don't care. FWIW, I am surprised about the correspondence "F16" to "menu". For one, most (PC) keyboards only go up to 12 [1], for the other, CUA [2] (the only "written" standard I can come up on those things) states that "menu" is F10. Probably some popular application started with it or something. > >When you say "emacs assumes" you are referring to some "GUI guts"? > > > I am referring to what emacs understand for the same key on gui or xterm. OK. > >>Part of my intention is to minimize the "special" customization required > >>when using xterm+emacs (either in Xdefaults or in init.el); any fancy > >>more specific customization can be made latter by the user when he gets > >>familiar with the rest of the environment (GNU/Linux, xterm, emacs, > >>Elisp, the command line interface, the OS configuration system...) for > >>new users it is like getting into Narnia the fist week/month. The best, IMO, would be to agree upon whatever escape sequences for those newer keys and convince terminal folks to implement that. Guessing around (aka "F16" =3D=3D "menu") is only going to make the tangle deeper. It is deep already :) > >The lowest common denominator would be to assume that there is no > >"print" (aka PrintSc) key, same for "menu", more so for "windows". > > > I started the thread asking because now I understand that in general the > [menu] key seems to emit the same than . What I don't know is if > the PrintSc does the same with a another key. See above. > The other think clear now is that \E[29~ is NOT [print]. It is either > (from xterm's source code and terminfo) or [menu] (as menu key > seems to emit the same X event in all the cases.) >=20 > So [menu] in general seems to be a shortcut for ? Probably you know > better than me about this conventions or where can be found in some X > sources? See above. I didn't know that and I can't even find hints about who has come up with it. If xterm maps both to the same escape sequence, perhaps one avenue could be to research whence that commit comes and ask the person whodunit. Perhaps she's still around :-) Who knows... perhaps that was the labeling on one particularly venerated workstation at some MIT lab ;-) > >>I expect that most of the emacs features work and behave as similar as > >>possible when using the xterm, tty or gui without customization, > >>everything out of the box. Don't get me wrong, I understand your goal and think it's a laudable one, but the layers you are talking to didn't know a "menu" key (or a "print" key, for that) exists when they were born. Some people (me included) don't have yet a "menu" key on their keyboards (nor an F16 key). So that kind of keyboards is around and will be with us for the next, say, 5 to 10 years. By then, we'll have a new key, this time it'll be Google's vanity key, say "search" [4]. Relying too much on a "menu" key being there doesn't look to me like a smart move just yet. But, of course, getting those exotic keys into the different terms (I'd try to include the Linux console) seems a worthy goal in itself. Perhaps a smart move would be to get a Linux distro (e.g. Debian) on board? They go to some lengths in making keyboard behaviour uniform across worlds (e.g. xterm/Linux console). Cheers [1] https://xkcd.com/670/ [2] https://en.wikipedia.org/wiki/Common_User_Access [3] It's a refurb Thinkpad X230, which was introduced around 2012. So it's not /quite yet/ a museum piece. The last ones in refurb shops seem to have been flushed out pretty recently, possibly accelerated by pandemics. [4] I should set up a bet. - t --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAmEmH7UACgkQBcgs9XrR2kafgACbBfiTojA9pcn6QCo9Vu7zMs/x L0AAmQECVS/vRPtViorN9lWatq3K9IAk =JZcT -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V--