From: Eli Zaretskii <eliz@gnu.org>
To: Cecilio Pardo <cpardo@imayhem.com>
Cc: luangruo@yahoo.com, 74423@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#74423: Low level key events
Date: Thu, 05 Dec 2024 07:41:24 +0200 [thread overview]
Message-ID: <867c8ezny3.fsf@gnu.org> (raw)
In-Reply-To: <162dada7-ad54-4ca5-8f11-d55dd6dccb3c@imayhem.com> (message from Cecilio Pardo on Wed, 4 Dec 2024 22:25:32 +0100)
> Date: Wed, 4 Dec 2024 22:25:32 +0100
> Cc: monnier@iro.umontreal.ca, luangruo@yahoo.com, 74423@debbugs.gnu.org
> From: Cecilio Pardo <cpardo@imayhem.com>
>
> On 04/12/2024 21:01, Eli Zaretskii wrote:
> >> + DEFVAR_LISP ("enable-low-level-key-events", Venable_low_level_key_events,
> >> + doc: /* If non-nil, reception of low-level key events is enabled.
> >> +
> >> +The value configures the set of keys that are handled:
> >> +
> >> +If t, send events for all keys.
> >> +
> >> +If a number, send events for the corresponding keysym. When calling
> >> +'llk-init', a set of variables with the xk- prefix is initialized with
> >> +the numeric values for keysyms. This numbers are platform dependent.
> >
> > This seems to say that it is impossible to make the value do the same
> > on all platforms? If so, I think it's less useful than it could be,
> > because Emacs generally tries to abstract platform-specific issues as
> > much as possible, to facilitate platform-independent Lisp programs
> > that work the same on all supported systems.
> >
> > Also, there's no information here where to find the list of these xk-
> > numbers.
>
> Those are variables, like xk-shift-l, xk-a, xk-f1. There is also
> llk-keysyms, that has a list of all xk-* symbols and their numeric values.
>
> llk-init initializes all of these variables, using numbers that are
> platform dependent (XK_* constant KeySyms for X, VK_* "virtual keys" for
> windows. GDK keys match X keys.
>
> Numbers are different, but users should use the variables, not the
> numbers, for binding and comparing to event values.
This should be explicitly told in the doc string. Also, if the xk-*
variables are platform-independent, the rule to map their names to
keyboard keys should be explained somewhere, perhaps in the manual, so
that Lisp programmers could easily know how to identify the keys which
they stand for.
> I can translate the Windows numbers to the X equivalents, so that they
> are equal on both platforms.
I'm not sure this is needed, if the xk-* names are the same.
> In any case, I will document this better, with a manual change
> proposal.
Thanks. This facility definitely needs to be in the ELisp manual
before we install it.
next prev parent reply other threads:[~2024-12-05 5:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fb50ec11-7aec-481e-8a3a-ecdcf22eb7c0@imayhem.com>
[not found] ` <31bdc55d-8c13-4de0-9cef-bd6cc4fb033f@imayhem.com>
[not found] ` <s1r8qtzsvbe.fsf@yahoo.com>
2024-11-18 20:35 ` bug#74423: Low level key events Cecilio Pardo
2024-11-18 23:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-23 12:08 ` Cecilio Pardo
2024-11-19 15:29 ` Eli Zaretskii
2024-11-19 16:43 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-19 20:05 ` Cecilio Pardo
2024-11-20 4:21 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-02 16:54 ` Cecilio Pardo
2024-12-04 20:01 ` Eli Zaretskii
2024-12-04 21:25 ` Cecilio Pardo
2024-12-05 5:41 ` Eli Zaretskii [this message]
2024-12-06 1:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-07 21:52 ` Cecilio Pardo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=867c8ezny3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=74423@debbugs.gnu.org \
--cc=cpardo@imayhem.com \
--cc=luangruo@yahoo.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).