From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: xterm [menu] key definition Date: Wed, 25 Aug 2021 13:31:36 +0200 Message-ID: <20210825113136.xi6ed47hujm4uhkt@Ergus> References: <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> <20210825104717.GA22741@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23381"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: tomas@tuxteam.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 25 13:33:46 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 1mIrA8-0005rf-6R for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Aug 2021 13:33:44 +0200 Original-Received: from localhost ([::1]:60272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIrA7-00087h-2I for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Aug 2021 07:33:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIr9N-0006w7-2S for emacs-devel@gnu.org; Wed, 25 Aug 2021 07:32:57 -0400 Original-Received: from sonic312-20.consmr.mail.bf2.yahoo.com ([74.6.128.82]:32979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIr9I-00025V-VG for emacs-devel@gnu.org; Wed, 25 Aug 2021 07:32:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1629891172; bh=nvh5nRGQdc0KysIxjwIO+nbMKwrl3EXQyO6pvnMdjuQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=ABKUwzyDlnbuOBOTWQ6NylbWaic01paQZ4v8s+/nirAkRhS29XDDU+qHPdv/1H0tXNzqsWyss6VuU+Fna4LKPAMpnRzOBSgIObhimIKoP5vmqQN0epvmwR/e49A662GyzMQ+7Z9PvlJNAd/dKM/5T6gyducZCDxpiLeTvx8ePO5IDOrmc+nkhpLJoffRxnrd4XIeY96BLs8BRHdbdkk6hbgEDv1Z5LQAtDd6pDMZNd54Min6pjgysCgp8UDgRVnN8CO3+bX7CgQwiWtvUxjXqGdnOdoJKeXuFX0IuRf5qjJvA+SuFwi2x5x4UfVKYgsu++vLwwUp2N/KVwxkqpEIOQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1629891172; bh=qZVNhG+Xh5zEMoyZQ57b2AmQWQVggq8PyTjrG8R+pK9=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=CTzpHhY+6FyZpyNhZkUVIJZpvQgLhDCNQpzvqCELYxue5Pov9CMzmOp1kJ1jpEYSiaiaISDtR6lZapPY80/64GNCrcoEzVHjYdvFnrRHmxoNP2Sh9K+P2WLeuinFx8DDZGAbTuXPl0WYRzEXXYDfRC4nldaf2Of6scjtmPzeg9bG+lkm0i2+x8BCssZXYfgec0HS8q7lGkRxPyoFtr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ahoo.com with HTTP; Wed, 25 Aug 2021 11:32:52 +0000 Original-Received: by kubenode519.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 845e0ef0f6ffdec4076f98f70398effd; Wed, 25 Aug 2021 11:31:59 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20210825104717.GA22741@tuxteam.de> X-Mailer: WebService/1.1.18906 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.128.82; envelope-from=spacibba@aol.com; helo=sonic312-20.consmr.mail.bf2.yahoo.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:272966 Archived-At: On Wed, Aug 25, 2021 at 12:47:17PM +0200, tomas@tuxteam.de wrote: >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=\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. > There is a miss understanding here. What is normally called menu in refers to the menu-bar in all the applications (usually the File section in the menu-bar; something emacs gui already has and works fine BTW) The [menu] key we are discussing here is a completely different beast. Associated normally with right click action. You can try on any editor, office or graphical application around. >> >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. > This is already in xterm give a look to the Yuri Khan email: https://github.com/Maximus5/xterm/blob/master/src/input.c#L1429 https://github.com/Maximus5/xterm/blob/master/src/input.c#L1460 >Guessing around (aka "F16" == "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.) >> >> 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 ;-) > xterm maintenance is currently a single man effort; the other emulators try to keep compatibility with it; including applications like tmux. >> >>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]. > The probably google will make it's kay an alias for fX where X is any vale > 12 not taken already. >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). > look at the links above. >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