From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74423: Low level key events Date: Tue, 19 Nov 2024 23:21:07 -0500 Message-ID: References: <31bdc55d-8c13-4de0-9cef-bd6cc4fb033f@imayhem.com> <705fabb8-1ea0-4894-8c32-05097ab822c9@imayhem.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8382"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74423@debbugs.gnu.org To: Cecilio Pardo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 20 05:22:31 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tDcEX-0001zd-VL for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Nov 2024 05:22:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDcED-0004yE-DZ; Tue, 19 Nov 2024 23:22:09 -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 1tDcE6-0004xs-Ed for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 23:22:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tDcE6-0002IV-5I for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 23:22:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=LIG0GyY80DPZwmRCP7VVWqAtiz3GeHjlLai3wmD9ePI=; b=feEbOLG/obOmCnTPRNd6FxR+Tb1lUP8vfRHJLQYVkfdBkJcOLyLp8JquaaZ2v8dDtuakwyZqy0TbGu77EgFBlOANCkwJRvuA741LzCgL3CrDYIeZZm241/Hwo/s7G+lpw8eIIh++b8ovmClCmg1KpuAyNnmgLUi894h4ypUnmt7yX/gwuCz5AgJfuL+7jh/ubNMIXMyfsJZGZqf9oNq1kBHALF1kApDA9BMQ6KVknnW0h0m4BPb7K8w2tVXZamg7KCrf028B+USMUgFcy3goAnNhQSaOR7waDs6JlJo/qiz2DM+YpEYoCxhrKIRziXfANFI4OCpHm0omlM4+60w/yw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDcE5-0003r1-Vr for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 23:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Nov 2024 04:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74423 X-GNU-PR-Package: emacs Original-Received: via spool by 74423-submit@debbugs.gnu.org id=B74423.173207647914746 (code B ref 74423); Wed, 20 Nov 2024 04:22:01 +0000 Original-Received: (at 74423) by debbugs.gnu.org; 20 Nov 2024 04:21:19 +0000 Original-Received: from localhost ([127.0.0.1]:44821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDcDP-0003pl-F9 for submit@debbugs.gnu.org; Tue, 19 Nov 2024 23:21:19 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDcDM-0003pS-68 for 74423@debbugs.gnu.org; Tue, 19 Nov 2024 23:21:17 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 54EE68093F; Tue, 19 Nov 2024 23:21:09 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1732076468; bh=u/dlODuMNVgCgj7eJr94SIpIsmXAVObelSgDWwbkYwM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Hsz6SJbByqYiPLJhXpTNmqBBjicWYaWnhgp72MiA/DXXKSSHHJFCKJ1moRdOa9xAy PdOXu+V9kaGQlB1W84uHf4mpGmu3FNBCdk/Z67D/DjbI1QAW6Oh3BxyLOnYYAH2wsZ h8v15FDZISqPoOk6zXtj8yawzl5odG8AFHM3kQLN/RhXjdH7wS0o4ZCLNrW89xt78X tkbTkVUq7PH+Iq7+3xDBk+wlZlaXUYDhv4bNcu5/7ibg7z5bkzsTKE8VbY78+He46Y HH+1OaBNdWv3mIBeBbItBOEAt40vOya4vHisOkkkrxo8T7r8sznmllLnADaMn3hxOB wkq5He0RNEPCQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7091C80394; Tue, 19 Nov 2024 23:21:08 -0500 (EST) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 41DA712038D; Tue, 19 Nov 2024 23:21:08 -0500 (EST) In-Reply-To: <705fabb8-1ea0-4894-8c32-05097ab822c9@imayhem.com> (Cecilio Pardo's message of "Tue, 19 Nov 2024 21:05:06 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295664 Archived-At: >> Move that code to a function, so you can get rid of this `hyper` >> special case. BTW, any reason why you couldn't use >> `event-apply-hyper-modifier`? > No, no reason. I will change that. To be clear: I don't know that it works here. >> I think the list of low-level keys handled here should not be hard-coded. >> IOW, maybe `enable-low-level-keys` should not be a boolean but >> a list/map/table indicating which keys to handle. > I was sending the keys for which I have an immediate use case. Using a list > looks got, adding some special symbols to choose groups, such as "all > modifier keys". I was also thinking that maybe the list/table could be used to avoid having to define in the C code what is a "modifier key" and things like that. >> So, IIUC you might generate 2 low-level events for a single key press? >> Why? > We want to allow to detect modifier keys, regardless of the key that is > used. For example, when you press Shift_L we generate an event for 'lshift > and other (of different type) for the modifier 'shift. But my question is about the fact that you generate two events, not about the two pieces of information. IOW you could also generate a single event with both pieces of information (and if use the "normal" keymaps instead of `special-event-map` then you might even have a `function-key-map` rule which converts a `Shift_L` down to a `shift` if there was no binding for the `Shift_L` event). Stefan