Subject: bug#74423: Low level key events

From: Stefan Monnier <[email-masked]>
Date: Tue, 19 Nov 2024 23:21:07 -0500

>> 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