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: Tue, 24 Aug 2021 17:30:03 +0200 Message-ID: <20210824153003.d5oakoawkqwke2yb@Ergus> 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> 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="32319"; 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 Tue Aug 24 17:31:39 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 1mIYOp-0008AU-Dn for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Aug 2021 17:31:39 +0200 Original-Received: from localhost ([::1]:38520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIYOn-0001Kr-Vw for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Aug 2021 11:31:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIYNq-0007xP-Hs for emacs-devel@gnu.org; Tue, 24 Aug 2021 11:30:38 -0400 Original-Received: from sonic309-13.consmr.mail.bf2.yahoo.com ([74.6.129.123]:36499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIYNn-0000HF-N2 for emacs-devel@gnu.org; Tue, 24 Aug 2021 11:30:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1629819033; bh=fSxFL1V7S55xqb22VodIfJzdOrZy82B3ueJvgx2mbJU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=G9ZSuxMR5TKgDrRVgg8j/Qh7J5Gf4g0RSM0I1L4KsPzF1EK2e7vluEm+KjaOW74JBeiUG96Rv5TQ3OfkjEjRNov4BG0cBPLCy6pFsiq/YuZ0Uc2S7mLaf7OtFuyi0wokoqbFg8cVpFalUioh9RJW8Xy5vymF10s6LCddI4KhoEv+3vmu1eH6Zi8+c2sTX6Y0d7wfdOtIJXEbg9hr9VenRl+L9CMpp4pXQZ21/WuxDQEKt08pJkfMEBpll24a1tRfo2spVVVTLB7EY6OF+L4v7fIVEszuQl7moXLHLVW7PHoNgzHvNssh2PShEj68Mk+OJtwGcMpW8X5ilSJd/f9lwA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1629819033; bh=TktUFHfzoWP73EdzyN0KbZ3ipxpPVYTo6rkr7I9t92D=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=TVOyDZytuZXqFwLPRywRwbRJszZFkbqAaCU7Ot0GH4ll5lLOLZOYPlDz4crShljJ6yGNAx8fwifSVyZmkOP4cQ3KvW1w6r4FMLlmsv1r35eShdGpPw1ixJjEYNW8ZZVsDSSWRFxCot8u40QZbmKoNJLREuWr642ubVAnDdBAcV0ovd+YkxYwA2MG118w5uw9TxOEFD6pFcIHiLPOLSI3c3TW7gs6ERtopHWskcGi/YLukkQVauOhXcogoKJsgrvB3fIT6fqw8CabVxoVhjnLmfif5Ijnj2ObO5l4HGnDlr47KltjPjGo5tEPY0Gtg0SXl5uuOz2eJNB3CwVaO4/SPg== X-YMail-OSG: 0gN4X2EVM1mGEQSvL6D9epBRinxeSSZfiiIGEGKsuYQLMXNuPsOl6U5N973qQis 2NXknG8lFtoOKToVNbcEaaPR17JgOIxXq1AluzH.diPRL2akwRcyW.2vnL.jE26qagdQPyamfD04 ylbB5CQQ6e8Qn9xs3vq2e6jlxIZ47KYz0121JlCCZWrF5iZGrooLT8ScZu3R8SmY8HwIgNma6Cib 0VvkTh1emgxyFW99_WlDItLX83CqXOlNvOvkdJrVdFWagsQdo63yxm95dWv8HCRtnI.g3oJeIou8 LZyU2YIo0yNIhWsTOA1zB7jfX_ablcqrahJORt4bbeUeeFsZVHzUtc8b5WguPCdKDXPZCDeCw5OH 6mbQLA2i5LnI8Rn.7JtgY_G_ec45Aq684.haMbSANTCEMKEYoCN7qP90xrbIpJ1U8A5RUgjyQzNH YrSxPexu0VIQqF_7hG51awTnFMNK.BUgi5_ZPfkO4WV6FwxdRY8zAkLCEjA.23aoUl7Jn3lI7La8 gi6fYSB8DiWuwhbDLCsri0SFT.MwQnuSvF.P50S_DYj34h2sO05lYK8b_.mwP7l9TrosvX4jQZfF Z76D7FkDw0p_32qUmpb.EqZaua2AvAASYElos0eONE9e5GUtdoEXvmsHpXXNIcFRLPzp7o8U5a9B unQhAFy_Dmaxu6nIuGcaRHfJ5m.H2L5hL7lsA_t8GuVjQnHaTbb0oN1d2N96UUipb50sVB0bHvEJ PrwJ7A8T9spgAmqgQ1d.hBRFd5FOr7hQCO4uNgNgU6ArnJfYa_GHCW59fSDE0s4lnM7n2fZV.TIG HXLmkGfzikye.cuafdnj1eHi8w8CNWMAcyb.M7HPbB X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.bf2.yahoo.com with HTTP; Tue, 24 Aug 2021 15:30:33 +0000 Original-Received: by kubenode519.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 03fd1ef702e5fe8f4959d51106ddf354; Tue, 24 Aug 2021 15:30:27 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20210824110014.GA28734@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.129.123; envelope-from=spacibba@aol.com; helo=sonic309-13.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=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:272910 Archived-At: On Tue, Aug 24, 2021 at 01:00:14PM +0200, tomas@tuxteam.de wrote: >On Tue, Aug 24, 2021 at 11:17:41AM +0200, Ergus wrote: > >[...] > >> Then if you have it, could you tell what escape sequence it sends throw >> Xterm by default? If you could do the same with urxvt will be very nice >> ;) > >Sure :) > >I tried both. My methodology is to run 'cat | hexdump -C' in each of >xterm and urxvt and to terminate input with CTRL-D. > >I tested the methodology itself by trying some keys where I more or >less knew what to expect ("a", , but also ). > >The result is... nothing. > >This may sound disappointing, but then, xterm tries to pretend being >a VT220, and those had no "print" key. > >OTOH, it would be subestimating the folks at MIT Project Athena to >assume that would not be configurable. Hard-coding this wouldn't >have made sense to them. > >So yes, for xterm at least (but I think for urxvt, too), you can >configure that with X Resources. This one [1] looks as if there >were hope as long as there is a keysym. No time to try it out >at the moment, though. > >Whether the application (Emacs) running "in" the xterm can change >that dynamically (or has to tell the user to do that for it ;) >is the next interesting question :-) > >Cheers >[1] http://www.fifi.org/doc/xterm/xterm.faq.html#how2_fkeys > which is, BTW, a wonderful resource in things xterm. > - t Hi! Thanks for the link! Of course we can emulate anything in xterm. The question is what xterm does by default? and why we bound the menu sequence to [print] instead of [menu] if emacs internally uses [menu] for execute-extended-command? If xterm assumes it is a VT220; then we must assume the same when using it by default (until we implement a more complex API to ask xterm... (but that may be inefficient and probably don't worth it for such a detail). Sometimes emacs assumes there is a [menu] key but then in xterm the same key is interpreted as [print] by emacs. So a very comfortable key (for those who have it) that we can't use consistently. 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. 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.