From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Physical keyboard events Date: Wed, 06 Nov 2024 15:31:23 +0200 Message-ID: <86ed3osd3o.fsf@gnu.org> References: <31bdc55d-8c13-4de0-9cef-bd6cc4fb033f@imayhem.com> <19ab52d0-88bd-4378-8fa8-8603e01233e3@imayhem.com> <871pzrl4sn.fsf@yahoo.com> <87o72vjk1f.fsf@yahoo.com> <86fro7uo6h.fsf@gnu.org> <87bjyvjdk2.fsf@yahoo.com> <867c9juetb.fsf@gnu.org> <87wmhiihzx.fsf@yahoo.com> <7c1b4258-447f-433c-939e-21df7f9eeec3@imayhem.com> <87ses6hx27.fsf@yahoo.com> <3cc3b427-0adf-49e7-8db7-506803c2b29b@imayhem.com> <87o72tj2hd.fsf@yahoo.com> <8545224f-07a8-435d-8be4-fac9a3b20409@imayhem.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37928"; mail-complaints-to="usenet@ciao.gmane.io" Cc: cpardo@imayhem.com, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 06 14:31:56 2024 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 1t8g8a-0009hy-Ev for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Nov 2024 14:31:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8g8D-0000qz-AH; Wed, 06 Nov 2024 08:31:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8g88-0000qY-5y for emacs-devel@gnu.org; Wed, 06 Nov 2024 08:31:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8g87-0000QK-Ml; Wed, 06 Nov 2024 08:31:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=yw3BiSbfx9p01KEOvWKCybSucmkDSZ1UjKS2Mj+t1J8=; b=qIdXVs+KJDON 6ZZcJxJ9E1II1ZdAI/ZjiEh1N3xSYY/9h7Qlj8GAFkn3Fixk/1/oUKEjP8OrWRav636IOamMpr9lO 1l0sbHNPVgUS6M3u8EWf58/zShOoqtIs5YJDDq5kJXObiK/wuHEIbjCckvpZcg6CcisRmmFeLNBIf 3w8KKLP0/jYAR5vTFY3mwB2sSGiA3DhenWSoX6Ba+M9YKiHQjTwMDx/JHgRJEr7tHKOQU3J8/h7Rj PjBkqXW6rwqoxv+WSb+cm2BQotXoXMNfcxHxBmE3WGRNFQRA3ZXiYl+OvC7JwiV/RkJwlIgq3u5Sw u44S2VNWM3yh2dHUA8BXDw==; In-Reply-To: (message from Po Lu on Wed, 06 Nov 2024 20:49:37 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325174 Archived-At: > From: Po Lu > Cc: Eli Zaretskii , emacs-devel@gnu.org > Date: Wed, 06 Nov 2024 20:49:37 +0800 > > I posted this twelve hours ago, but it was truncated in transmission. > > Cecilio Pardo writes: > > > We would respond to XK_Caps_Lock by sending an event with the symbol > > 'capslock, and to Control with lctrl and rctrl. If the control key is > > unavailable beacuse it serves another purpose, then user should not > > bind it to anything. > > This would prevent any portable Lisp program from being written that > exercises this feature. For example, your patch only handles Alt_L and > Alt_R, while the key _labeled_ alt on the right side of my keyboard is > mapped to ISO_Level3_Shift. The purpose of detecting left and right > keys is defeated anyway by such rudimentary treatment of the X keyboard > system. > > > I don't think this is incorrect in any way. We are giving the user the > > ability to detect this keypresses. It's up to the user to decide if > > she wants to do it or not. > > I don't agree. Users may be completely excluded from deciding this > question if they are installing another person's Lisp, for example. > > > So I can bind a different command to each one of them. > > Why can't you read the modifier map _first_ (by keycode, not keysym), > before trying to distinguish between left and right keys by inference > from the keysym, or by reading the keyboard geometry if XKB is > available? And report key events such as `meta' and `right-meta'? I already said that we could have both what you want and what Cecilio considers TRT. Why do you keep arguing for your concept as the only one?