From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Physical keyboard events Date: Mon, 04 Nov 2024 22:37:44 +0800 Message-ID: <877c9jjc93.fsf@yahoo.com> References: <31bdc55d-8c13-4de0-9cef-bd6cc4fb033f@imayhem.com> <19ab52d0-88bd-4378-8fa8-8603e01233e3@imayhem.com> <871pzrl4sn.fsf@yahoo.com> <86ldxzuohg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="331"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: cpardo@imayhem.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 04 15:39: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 1t7yEO-000AST-GL for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Nov 2024 15:39:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7yDf-0000KE-J6; Mon, 04 Nov 2024 09:38:16 -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 1t7yDR-0000JI-GG for emacs-devel@gnu.org; Mon, 04 Nov 2024 09:38:03 -0500 Original-Received: from sonic315-20.consmr.mail.ne1.yahoo.com ([66.163.190.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7yDP-0003bG-T8 for emacs-devel@gnu.org; Mon, 04 Nov 2024 09:38:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1730731077; bh=AFgJKsWHOeV2g+I04DGTaZWUx7Ljt4ndhRvX2IRK+CM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=oiE113jR9qjFzpYGzN5htb1LTtyHTMnq9+vevuN43OQHx6mtOIn4E2KlJ3uPu8R5GMudgVaNvrFMvD24mUuZ57Axlx9lgP3gNWMw8rPFiuDu2nE9NRo1iLQwqhqoWKr0kGb0gviWahwcxo9bWSKl050UGuWgjCIoOyruUjVnGcHUt1osaP3SrFpXxJdNjvCgKtRXlA+rU6MhgDfgik5CT7hhDU4ISDi1BQhffc9YjJ71r7jv97y+5feuDyYhUMWGNZVQaWXuGUNJr5Q06yIXlblF+XNQkAfc6rMr5zR0OPY3i96fiinz2wtkNxVp1a8v5MSUQwL+pWNPpA/tgSqFVw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1730731077; bh=49rLmGptlbLLDda6G5TtVAseEQyh4rfHnqydJ9gjzD6=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=aQktycj1+t2ZKnUfGZDTLA08WmeCIBG0QlUR4+cXCHuX9x7fnV7x23u0g0PDLvD+TDh6u7k04MNWR2G5sErNnadr7cOPzwqfGZSb3VGrYyeGsvi6I+RQ6zMz1lMqie3xDYIJ8Ib+ymcwDWULAOlLpGkJyDfr4lK4HHbvjf1pKBJCyHKMSZD3/fUgJiOzXqvNovp85lqTjcGXcf6pvTIiWSDf4oLouBPA6cvgXg9GD5Vsmcxg5waXLRdyv17CaXtUbkI/p95FpfxoG+ecLW6si+LJmnT79WDdkd+P2E9b+5YnG5z/HimFkjpd02alz7+tN71o1LiruezWsfo8yvf4qA== X-YMail-OSG: gwx2aDUVM1mSJuyw5UF5CintxCR3gNKNQV1NLOLL56g1aDPeEKWYhpSoIPjXvKe FxdX4TW16.3od7nTpJ8qbNufDG0FQhpCTaG6.zAQVmIC9jO9NOY.HB1JCyyWmTrqcXsSarRJVCJA vPwgVKeZ1.tisR3l.5.TxErLlukMuiJZFGt6IA3h47YWic_vsNRaKEiUISOvy.PXleC3Se0A6Np1 h9Ptd5lCUur3VEK.upRnGYNbdG9PLsDyk7vEQXA9.vUvwzjrN5N0U9ogQyqTn3agHV3GntttjdDV EpFDu4Pw60UVw54dg0MQE1yw.7KC2sbZ45.R2BK7Awz3qza1zGfCx_dhkf13tG3aVopdVscpbvTd iUOYy.z..IGPhg0uXuYUM494D8g_gRxjB2L5ZFFN.AYFA.GiOE19R3QXPar5bjhB_LSI5WVtVBpm CSLHmSm1eCaKU7rbv1oKTR_svRK2ifnx32U9AVJXDBD9I5roBHKKyEY2z.B3Q657ZYDjzqTS6U57 vz8vqQPb82ExBZJCIRpJcJf.l7M0v4dM2NB3qga.gTWOsV4ilikFiqqMv1nb_xMkQy6sUbIFPniN H0Xp4N9d1JavKKNH6WRDlxLeE0y645D310x5J83ZK0.e.L62zpcHu7530n3VcSLrZWUhfM6HEBZr Aa4Qtl.JMxhZar3a77AHwI_ZlQiZrTcMANH7Vtg9PDVIwTte3BGxkP4YLKoBqJwVO7LC4_vxsSYZ s8cAW7XHwGe9zaxUjvBO.SkUdbcWOTdnwcRT3kJ8spAbXvHP1MxOfb.TyvrB6LXYH4Q_FTwsQxii bZYwNPVkA_FM6vToNrIeSp93w1.s5VfLuoA4SzdhG5 X-Sonic-MF: X-Sonic-ID: ee2cbfe3-c336-4283-a851-f2dab6c1b89a Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.ne1.yahoo.com with HTTP; Mon, 4 Nov 2024 14:37:57 +0000 Original-Received: by hermes--production-sg3-5b7954b588-sgpdh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID b9aadd1d997d8e101d62a9902d9c7122; Mon, 04 Nov 2024 14:37:51 +0000 (UTC) In-Reply-To: <86ldxzuohg.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 04 Nov 2024 15:18:03 +0200") X-Mailer: WebService/1.1.22806 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.190.146; envelope-from=luangruo@yahoo.com; helo=sonic315-20.consmr.mail.ne1.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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.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:325107 Archived-At: Eli Zaretskii writes: > I don't think I agree with you. I think I'm with Cecilio here. > Physical key events means that Emacs doesn't perform any conversions, > it leaves that to the Lisp program which receives such events. E.g., > when I press the Alt key, I expect to see an event of pressing the Alt > key, not a (non-existent) Meta. And if I press the Right Alt key, I > expect to see AltGr, not Alt and not Meta. The issue is that X does not attach enough significance to keysyms reliably to tell AltGr from Alt, or the like, with a keysym alone. A keysym is just that--a symbol printed on a key cap, and it is up to users to bind these keys to modifier bits, all of which but Shift, Caps Lock, and Ctrl are completely nondescript and for client programs such as Emacs to interpret. E.g., AltGr could be configured on the OS level to serve as a level 3 shift key, as it typically does, or as an entirely different modifier, without affecting the keysym (XK_Alt_R _or_ XK_ISO_Level3_Shift) or even the modifier bit (on my system, Mod5) generated. Likewise, Caps Lock could be configured to Control while continuing to be reported as XK_Caps_Lock. 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. >> 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?