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: Wed, 06 Nov 2024 20:49:37 +0800 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37645"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Cecilio Pardo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 06 13:50:28 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 1t8fUR-0009do-4C for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Nov 2024 13:50:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8fU4-0000Gz-C9; Wed, 06 Nov 2024 07:50:04 -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 1t8fU1-0000G7-JD for emacs-devel@gnu.org; Wed, 06 Nov 2024 07:50:01 -0500 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8fTz-0004bb-To for emacs-devel@gnu.org; Wed, 06 Nov 2024 07:50:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1730897389; bh=sCCsxbuCK5Sz7yokw5Apwo+rUga347NNma+yCq5x4DM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=nmJFCr/gGyfR8egkd5FkG+YE8qyirs3je0UIjotfdMhkQY8vhC6Q0rHKvrqbCnWQUW3gcPRw8TzSAFmfVBT2WK5oAWeeMqahxryoXC9BcLzJOetAUnrGS53wh7LXcf5hUSE+t8g4GfyoUk+Mm7JQ3r29ugGj0rtHkzJ0yGCqD1z9FevvW/v2syfkNTwk84hsLU1h1QtqCI5UsJsDcppGfOe6Qf+CSZMRkesFTjCwQ9o8esxqW8fa1xYciDX1DaDNWD25JIvTILvNC2JjccOSQLbsBWXRKnPM4xGfuGVxRuS7fapcDzzEguIWovjlnj9ZH0jaSPjXs5+kPiN24jVV5Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1730897389; bh=YKjExslMR+j8BtRwkEwLSuqACvXjf7NZW6GA7LlEKKH=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=DYoLIEwe2jTn6D26XKrWVYYIBJMtldP6jAsK2Isb5uZcQo7q/iqHJyxzTwK2pEsqvcEwOyFfAqJR2hnzPx9NyjOHyML4LtptYXCdIuaDuV4ZZ/4ZvtEI72j4kmCI+3gLVIVS6GmPTTcyQ93nOD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EdA X-Sonic-MF: X-Sonic-ID: a6f91cd4-168a-49c5-9315-80771a0568a6 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Wed, 6 Nov 2024 12:49:49 +0000 Original-Received: by hermes--production-sg3-5b7954b588-v48xf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID afc81261a150003e95e5e35a4aa6c0e3; Wed, 06 Nov 2024 12:49:44 +0000 (UTC) In-Reply-To: <8545224f-07a8-435d-8be4-fac9a3b20409@imayhem.com> (Cecilio Pardo's message of "Tue, 5 Nov 2024 15:27:48 +0100") 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.186.204; envelope-from=luangruo@yahoo.com; helo=sonic310-23.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=ham 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:325171 Archived-At: 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'?