From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Ctrl-[ ? Date: Fri, 07 Jun 2019 23:16:55 +0300 Message-ID: <83muitp2vc.fsf@gnu.org> References: <08AC8151-5911-40FA-8B20-818B839D00AB@traduction-libre.org> <86h892nk2g.fsf@zoho.eu> <9379C01B-80E3-49DD-B830-46CED773DC2C@traduction-libre.org> <83lfydrkde.fsf@gnu.org> <874l51q0s4.fsf@telefonica.net> <83ef45rdij.fsf@gnu.org> <87zhmto6fa.fsf@telefonica.net> <8336klqxxy.fsf@gnu.org> <87v9xhntoy.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="7784"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 07 22:28:57 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hZLTt-0001up-C9 for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Jun 2019 22:28:57 +0200 Original-Received: from localhost ([::1]:53010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZLTs-0005bB-Cg for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Jun 2019 16:28:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52274) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZLIS-0006X9-4d for help-gnu-emacs@gnu.org; Fri, 07 Jun 2019 16:17:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hZLIQ-0002qW-Fp for help-gnu-emacs@gnu.org; Fri, 07 Jun 2019 16:17:08 -0400 Original-Received: from [176.228.60.248] (port=4795 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hZLIP-0003Cz-8W for help-gnu-emacs@gnu.org; Fri, 07 Jun 2019 16:17:06 -0400 In-reply-to: <87v9xhntoy.fsf@telefonica.net> (message from =?iso-8859-1?Q?=D3scar?= Fuentes on Fri, 07 Jun 2019 20:20:29 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120821 Archived-At: > From: Óscar Fuentes > Date: Fri, 07 Jun 2019 20:20:29 +0200 > > If *-set-key functions don't work with those combinations, as far as the > user is concerned, he is disallowed to bind them. But those functions do work with these keys, you just need to know what you are doing, in order not to shoot yourself in the foot. > Not everyone has a Stefan at hand to come with a hack to work around > the limitation. What's wrong with asking Stefan (or any other expert) when you want to do something unusual? No one can know everything. Treating every tricky solution as meaning you are "disallowed" is quite extreme. > It is easy to understand from where it came, what is puzzling is the > fact that it remained to this day. There's no puzzle from where I stand. > > I don't see how we can avoid jumping through hoops when the text > > terminal produces an ASCII key code whereas a GUI terminal doesn't. I > > invite you to read keyboard.c and keymap.c, where you will find a few > > more "accidents" like this. > > It is not possible (and even more practical than sprinkling the C code > base with special cases) to bind those key combinations to the > terminal-emulation functionality using the normal methods (keymaps) when > running as a gui? Or is it the problem that gui and tty frames can't > have different keymaps? I don't understand the questions. All the various variables mentioned in this thread had names that end in "-map", which means they are keymaps. Some keys are processed via several keymaps before their bound functions are invoked. So we do definitely use keymaps for this functionality. As for keymaps for gui and tty, I believe they are different: see lisp/term/*.el, where each terminal/emulator has its own keys in the keymap. I don't think the issue in this thread was about changing the default behavior, so whether tty and gui have different keymaps is not the issue. The issue is that remapping some keys is trickier than others.