unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Mouse wheel release events?
       [not found] <87y2562x7o.fsf.ref@yahoo.com>
@ 2021-11-30  2:28 ` Po Lu
  2021-11-30 15:24   ` Eli Zaretskii
  2021-11-30 20:18   ` Daniele Nicolodi
  0 siblings, 2 replies; 9+ messages in thread
From: Po Lu @ 2021-11-30  2:28 UTC (permalink / raw)
  To: emacs-devel

Some mouse wheels generate special events when the user moves his finger
off the wheel, even if the wheel was not previously clicked.

These events are used by most applications to start inertial scrolling,
support for which I would like to add to Emacs.

I want to add a `wheel-release' event that is sent every time Emacs
receives such an event from the mouse wheel.  Is that okay?

Thanks.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mouse wheel release events?
  2021-11-30  2:28 ` Mouse wheel release events? Po Lu
@ 2021-11-30 15:24   ` Eli Zaretskii
  2021-12-01  0:50     ` Po Lu
  2021-11-30 20:18   ` Daniele Nicolodi
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-11-30 15:24 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Date: Tue, 30 Nov 2021 10:28:43 +0800
> 
> Some mouse wheels generate special events when the user moves his finger
> off the wheel, even if the wheel was not previously clicked.
> 
> These events are used by most applications to start inertial scrolling,
> support for which I would like to add to Emacs.
> 
> I want to add a `wheel-release' event that is sent every time Emacs
> receives such an event from the mouse wheel.  Is that okay?

Can you please point me to the technical description of such a mouse?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mouse wheel release events?
  2021-11-30  2:28 ` Mouse wheel release events? Po Lu
  2021-11-30 15:24   ` Eli Zaretskii
@ 2021-11-30 20:18   ` Daniele Nicolodi
  2021-12-01  0:51     ` Po Lu
  1 sibling, 1 reply; 9+ messages in thread
From: Daniele Nicolodi @ 2021-11-30 20:18 UTC (permalink / raw)
  To: emacs-devel

On 30/11/2021 03:28, Po Lu wrote:
> Some mouse wheels generate special events when the user moves his finger
> off the wheel, even if the wheel was not previously clicked.
> 
> These events are used by most applications to start inertial scrolling,
> support for which I would like to add to Emacs.
> 
> I want to add a `wheel-release' event that is sent every time Emacs
> receives such an event from the mouse wheel.  Is that okay?

Which environment gives applications access to this kind of events? I 
think on (modernish) GNU/Linux these would be handled by libinput 
directly, relieving the application from the duty of handling these.

Cheers,
Dan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mouse wheel release events?
  2021-11-30 15:24   ` Eli Zaretskii
@ 2021-12-01  0:50     ` Po Lu
  2021-12-01 13:06       ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Po Lu @ 2021-12-01  0:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Date: Tue, 30 Nov 2021 10:28:43 +0800
>> 
>> Some mouse wheels generate special events when the user moves his finger
>> off the wheel, even if the wheel was not previously clicked.
>> 
>> These events are used by most applications to start inertial scrolling,
>> support for which I would like to add to Emacs.
>> 
>> I want to add a `wheel-release' event that is sent every time Emacs
>> receives such an event from the mouse wheel.  Is that okay?
>
> Can you please point me to the technical description of such a mouse?

I don't know how to find the technical description of a mouse, but here
is the XInput 2 documentation.  You should specifically look at the
section titled "Pointer emulation from multitouch events":

  https://www.x.org/releases/X11R7.7/doc/inputproto/XI2proto.txt

While the documentation makes it seem specific to touchpads, at least 2
kinds of mice, Apple's "Magic Mouse 2", and some Logitech mice with
"hyperscrolling" also generate events in that specific way.

Thanks.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mouse wheel release events?
  2021-11-30 20:18   ` Daniele Nicolodi
@ 2021-12-01  0:51     ` Po Lu
  0 siblings, 0 replies; 9+ messages in thread
From: Po Lu @ 2021-12-01  0:51 UTC (permalink / raw)
  To: Daniele Nicolodi; +Cc: emacs-devel

Daniele Nicolodi <daniele@grinta.net> writes:

> On 30/11/2021 03:28, Po Lu wrote:
>> Some mouse wheels generate special events when the user moves his finger
>> off the wheel, even if the wheel was not previously clicked.
>> These events are used by most applications to start inertial
>> scrolling,
>> support for which I would like to add to Emacs.
>> I want to add a `wheel-release' event that is sent every time Emacs
>> receives such an event from the mouse wheel.  Is that okay?

> Which environment gives applications access to this kind of events? I
> think on (modernish) GNU/Linux these would be handled by libinput
> directly, relieving the application from the duty of handling these.

The X Input Extension generates special kinds of motion events along
with a whole class of touch events for this kind of device event.

It does not perform any further processing on them.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mouse wheel release events?
  2021-12-01  0:50     ` Po Lu
@ 2021-12-01 13:06       ` Eli Zaretskii
  2021-12-01 13:31         ` Po Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-12-01 13:06 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Wed, 01 Dec 2021 08:50:01 +0800
> 
> I don't know how to find the technical description of a mouse, but here
> is the XInput 2 documentation.  You should specifically look at the
> section titled "Pointer emulation from multitouch events":
> 
>   https://www.x.org/releases/X11R7.7/doc/inputproto/XI2proto.txt
> 
> While the documentation makes it seem specific to touchpads, at least 2
> kinds of mice, Apple's "Magic Mouse 2", and some Logitech mice with
> "hyperscrolling" also generate events in that specific way.

Regardless of which mice support these events, they (the events) are
touch events, not mouse events.  So I think we should name them as
such, because someone in the future might add support for the full
spectrum of touch events to Emacs.

So wheel-release doesn't strike me as a good name.  What kind of touch
event (or series of events) that emulates?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mouse wheel release events?
  2021-12-01 13:06       ` Eli Zaretskii
@ 2021-12-01 13:31         ` Po Lu
  2021-12-01 13:48           ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Po Lu @ 2021-12-01 13:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Regardless of which mice support these events, they (the events) are
> touch events, not mouse events.  So I think we should name them as
> such, because someone in the future might add support for the full
> spectrum of touch events to Emacs.

We haven't explictly selected (asked the X server to send us) for
TouchEnded events, so what we receive is a special kind of motion event,
where the valuators are marked as modified, but there is no actual
change in valuator state.

> So wheel-release doesn't strike me as a good name.  What kind of touch
> event (or series of events) that emulates?

It's hard to tell.  With these mice, it is a single TouchEnd event, but
with a trackpad it could be a whole series of touch events.

Perhaps `touch-end' should suffice (specifically for the touch end
event, and not for the whole series of events, which we do not support
yet)?

Thanks.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mouse wheel release events?
  2021-12-01 13:31         ` Po Lu
@ 2021-12-01 13:48           ` Eli Zaretskii
  2021-12-02  2:17             ` Po Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-12-01 13:48 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Wed, 01 Dec 2021 21:31:14 +0800
> 
> Perhaps `touch-end' should suffice (specifically for the touch end
> event, and not for the whole series of events, which we do not support
> yet)?

Yes, touch-event should do for now.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Mouse wheel release events?
  2021-12-01 13:48           ` Eli Zaretskii
@ 2021-12-02  2:17             ` Po Lu
  0 siblings, 0 replies; 9+ messages in thread
From: Po Lu @ 2021-12-02  2:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> Perhaps `touch-end' should suffice (specifically for the touch end
>> event, and not for the whole series of events, which we do not support
>> yet)?

> Yes, touch-event should do for now.

Thanks, I will add support for it now.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-12-02  2:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87y2562x7o.fsf.ref@yahoo.com>
2021-11-30  2:28 ` Mouse wheel release events? Po Lu
2021-11-30 15:24   ` Eli Zaretskii
2021-12-01  0:50     ` Po Lu
2021-12-01 13:06       ` Eli Zaretskii
2021-12-01 13:31         ` Po Lu
2021-12-01 13:48           ` Eli Zaretskii
2021-12-02  2:17             ` Po Lu
2021-11-30 20:18   ` Daniele Nicolodi
2021-12-01  0:51     ` Po Lu

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