[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs Master d277123f4bf] pixel-scroll-precision-scroll-up-page fee
From: |
JD Smith |
Subject: |
Re: [Emacs Master d277123f4bf] pixel-scroll-precision-scroll-up-page feels pause, but pixel-scroll-precision-scroll-down-page is smooth |
Date: |
Tue, 3 Sep 2024 21:56:26 -0400 |
> On Sep 3, 2024, at 9:13 PM, Po Lu <luangruo@yahoo.com> wrote:
>
> JD Smith <jdtsmith@gmail.com> writes:
>
>> Unfortunately this package only works on the Carbon emacs-mac port,
>> which exposes rich scroll events with pixel-level delta data.
>
> Really? Emacs has reported this data on all supported platforms since
> 29.1, as documented in (elisp)Misc Events. The interpolation
> implemented by pixel-scroll.el is not designed for events carrying this
> data but for those generated by mice.
Interesting, I actually hadn't seen those new wheel-up/down PIXEL-DELTA values.
They come straight from the system?
These are the mouse event properties delivered on Carbon emacs:
;; (nth 3 event) is a plist that may contain the following keys:
;; :direction-inverted-from-device-p (boolean)
;; :delta-x, :delta-y, :delta-z (floats)
;; :scrolling-delta-x, :scrolling-delta-y (floats)
;; :phase, :momentum-phase (symbols)
;; possible value: `none', `began', `stationary', `changed',
;; `ended', `cancelled', or `may-begin'
;; :swipe-tracking-from-scroll-events-enabled-p (boolean)
The key of interest is :scrolling-delta-y (a float), which taps directly into
the system scroll amount, as configured in settings (with momentum, etc.). I
had the impression there was nothing equivalent in other emacs builds, and that
was why pixel-scroll-precision has its own elisp-based "driver". So all the
momentum/interpolation code in pixel-scroll is effectively to allow low
resolution mice to simulate high scroll event rate trackpads?
Will take a closer look, thanks.