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: Tue, 05 Nov 2024 15:06:08 +0200 Message-ID: <86h68lu8xr.fsf@gnu.org> References: <31bdc55d-8c13-4de0-9cef-bd6cc4fb033f@imayhem.com> <19ab52d0-88bd-4378-8fa8-8603e01233e3@imayhem.com> <871pzrl4sn.fsf@yahoo.com> <86ldxzuohg.fsf@gnu.org> <877c9jjc93.fsf@yahoo.com> <865xp3ueoq.fsf@gnu.org> <8734k6jxvf.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38738"; 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 Tue Nov 05 14:08:00 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 1t8JHr-0009rg-GX for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Nov 2024 14:07:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8JGD-0004B4-Oc; Tue, 05 Nov 2024 08:06:17 -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 1t8JG8-0003tC-Ia for emacs-devel@gnu.org; Tue, 05 Nov 2024 08:06:15 -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 1t8JG7-0002Ze-GN; Tue, 05 Nov 2024 08:06:11 -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=Lh6iiW3Ju89LYdsPgUWcsWqKEI+vw8GwlYBnuPFRGSo=; b=RbrcXUbNph3s AYNedoqIJVS8j2YgBp1Ky7mcb/KTnfxJipN/7gbJ/6203N/29Oa2YeazzdieQtutw+3X+3JVaVE5X r7RCyfYpg6+icmuK1tQrH/YbLzZELA5EeK+4me04HLBvh39XTiIAf2fZuc+xU432R8pwOrVnaeWGE Q/w0Jkz++TNyg2vqXHM7xaISUzTkvras9QNPSyIHSsNUL9SvQfWd+2MKRW6OWq+xufSRVlPT07idk hmhGeggB3LfF2Nl3dCz6GO8+35PWLBOaxgAeHEhFv/cu4xpKhETGhxnMo36Rj79myZk2XygY2AV7B AjwkHL7F1jy5ZYz32WP4Qw==; In-Reply-To: <8734k6jxvf.fsf@yahoo.com> (message from Po Lu on Tue, 05 Nov 2024 09:03:00 +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:325136 Archived-At: > From: Po Lu > Cc: cpardo@imayhem.com, emacs-devel@gnu.org > Date: Tue, 05 Nov 2024 09:03:00 +0800 > > Eli Zaretskii writes: > > >> From: Po Lu > >> Cc: cpardo@imayhem.com, emacs-devel@gnu.org > >> Date: Mon, 04 Nov 2024 22:37:44 +0800 > >> > >> Emacs already tries to establish a sensible relationship between > >> modifier bits and Emacs modifiers, and clearly, the reasonable way > >> forward is to write a small quantity of code to deduce the modifier bits > >> produced by a keysym, and reuse the existing mechanism to report a > >> modifier that users will expect, instead of engineering a different > >> mechanism for the purposes of reporting modifier activation and > >> deactivation, or, as Cecilio's patch currently does, reporting keysyms > >> totally independent of the modifiers actually bound to their keys. > > > > I can see a place for both. It all depends on what the Lisp program > > wants to do. So I guess we should allow Lisp programs to receive one > > or the other. > > What _is_ the place for the second? Which one is the second? > Binding commands to a modifier key > is possible whatever may be the name of the key to which they are bound > (alt or meta). But if there's no Meta key on the keyboard, emitting Meta will be misleading, at least in some use cases. > Besides, the patch as written doesn't implement either > behavior reliably, because it tests against a few specific keysym names, > which is not a reliable means of detecting modifier keys on X. That's a separate issue. We are discussing the principles here, and principles don't depend on the particulars of some implementation. > >> >> BTW, if the intention is to forward just modifier key events to Lisp, > >> >> don't let's refer to them as "physical keyboard events", but in more > >> >> specific terms. > >> > > >> > Yes, I think the idea is to generate modifier key events and expose > >> > them to Lisp. What is more specific than "physical keyboard events"? > >> > >> "Modifier activation and release events", perhaps? > > > > That's a mouthful. How about "low-level keyboard events"? > > This still misleadingly implies that keys beyond modifiers will be > reported. If you were talking about modifier keys only, why do these events need a separate name? I suggested the above as the name for all raw keyboard events, no matter which key is pressed/released.