emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why mouse-1/2/3 ?


From: Stefan Monnier
Subject: Re: Why mouse-1/2/3 ?
Date: Mon, 27 Apr 2020 11:13:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> As far as I can tell, we're missing one explanation: mice might be on
> their way out, people use touch-sensitive surfaces (both the sensible

It's more than that: while over the years there have been many different
kinds of "mouse" device in use.  The terms `mouse-N` aren't wrong:
they're just too low-level.

In xmodmap's terminology, `mouse-1` is basically a "keycode", i.e. an
internal number used to uniquely identify a particular event.

Sadly, X11 has never developed any layer on top of that to give
meaningful names (aka "keysyms" in xmodmap's terminology) to
those numbers.

Emacs could invent its own mouse-button-naming layer (so I could name
my mouse-4/5 as scroll-wheel-up/down and my mouse-1 as mouse-left, and so
people who use a different device could name them differently).
We already have the underlying mechanism for that:
`input-decode-map` could be used to map `mouse-1` to `mouse-left` (and
we could use `function-key-map` to give a fallback default to remap
`mouse-left` back to `mouse-1` for backward compatibility).

But it's fundamentally a failing of X11, AFAIK.  This said, I'm not at
all up-to-date on the input-device layers of Linux/X11/Wayland, so maybe
there is a good solution out there.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]