bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#56779: 29.0.50; [wishlist] Function to check if a mouse-button is pr


From: Po Lu
Subject: bug#56779: 29.0.50; [wishlist] Function to check if a mouse-button is pressed
Date: Tue, 26 Jul 2022 18:18:40 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Visuwesh <visuweshm@gmail.com> writes:

> Currently, to know if a mouse button is being pressed, one has to keep
> track of state by cleverly utilising [down-mouse-N] and [mouse-N] events
> (see [1]).  It is certainly no easy task, it would be really nice if
> Emacs had the equivalent of `xinput --query-state <mouse-id>' [2]
> (the implementation of which can be found in state.c in xinput's
> source).

Relying on the X input extension is not portable, not only outside of
X, but also inside Emacs, which supports being run on X servers where
the input extension is not available.

How about a function that returns a list of mouse buttons currently held
down on a given terminal? That would be very straightforward to
implement.




reply via email to

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