[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Physical keyboard events
From: |
Yuri Khan |
Subject: |
Re: Physical keyboard events |
Date: |
Thu, 31 Oct 2024 00:13:31 +0700 |
On Wed, 30 Oct 2024 at 22:27, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Yuri Khan <yuri.v.khan@gmail.com>
> > Date: Wed, 30 Oct 2024 13:28:20 +0700
> > Cc: emacs-devel@gnu.org
> > I’m going to posit the hypothesis that the *only* command for which it
> > makes sense to use the keysym of the current layout is
> > ‘self-insert-command’.
> >
> > Everything else wants the keysym of “the” Latin-based layout if there
> > is one and only one; the keycode if there is none; and some heuristic
> > tiebreaker for the case where the user has more than one Latin-based
> > layout configured.
>
> How do you suggest to arrange for a low-level keyboard interface to
> know which kind of Emacs command attempted to read the keyboard?
Since it’s not clairvoyant, it would need to save enough information
for the keymap lookup code downstream. Specifically (XKB/X11 case):
state of modifiers, keycode, keysym according to the currently active
group, and keysym according to the appropriate Latin-based group.
Then, at the time of keymap lookup:
* Look up the active modifiers + active group keysym.
* If this yields ‘self-insert-command’ or another command
specifically whitelisted, return that.
* Look up the active modifiers + keysym from the Latin-based group. Return that.
Test case: If a mode keymap binds both ‘/’ and ‘.’, and a key produces
‘/’ in the Latin layout and ‘.’ in Cyrillic layout, then the ‘/’
command shall be executed regardless of whether Latin or Cyrillic
layout is active.
- Re: Physical keyboard events, (continued)
- Re: Physical keyboard events, Eli Zaretskii, 2024/10/29
- Re: Physical keyboard events, Yuri Khan, 2024/10/29
- Re: Physical keyboard events, Eli Zaretskii, 2024/10/29
- Re: Physical keyboard events, Max Nikulin, 2024/10/29
- Re: Physical keyboard events, Yuri Khan, 2024/10/30
- Re: Physical keyboard events, Peter Feigl, 2024/10/30
- Re: Physical keyboard events, Eli Zaretskii, 2024/10/30
- Re: Physical keyboard events,
Yuri Khan <=
- Re: Physical keyboard events, Eli Zaretskii, 2024/10/30
- Re: Physical keyboard events, Dov Grobgeld, 2024/10/30
- Re: Physical keyboard events, Juri Linkov, 2024/10/30
- Re: Physical keyboard events, Eli Zaretskii, 2024/10/30
- Re: Physical keyboard events, Yuri Khan, 2024/10/31
- Re: Physical keyboard events, Eli Zaretskii, 2024/10/30
- Re: Physical keyboard events, Max Nikulin, 2024/10/30
- Re: Physical keyboard events, Cecilio Pardo, 2024/10/29
- Re: Physical keyboard events, Cecilio Pardo, 2024/10/29
Re: Physical keyboard events, Alan Mackenzie, 2024/10/29