reddit / emacs
Emacs 29's pixel-scroll-precision-mode doesn't work with mouse. Only with touchpad
valignatev · 2022-10-13 16:41
Heyo, has anybody managed to make `pixel-scroll-precision-mode` work with mouse? I'm on HEAD, and it only works with touchpad on my laptop, but mouse emits regular line-based scroll. Of course, I made sure `pixel-scroll-precision-interpolate-mice` is set to `t`, and mheel-up/mweel-down are both bound to `pixel-scroll-precision`.
northgaard1 · 2022-10-13 18:04
Sounds like something where the “usual” steps apply:
1. Try if you can reproduce it with emacs -Q
2. If no, there’s some issue with your config, if yes, report your issue to emacs-devel.
valignatev · 2022-10-13 18:08
Yeah, forgot to mention that it's reproducible with -Q too.
_hmenke · 2022-10-13 19:18
Did you check that the scrollwheel is sending `mhweel-up` and `mwheel-down`? Sometimes that's not the case and instead `mouse-4` and `mouse-5` is sent which might not map to precision scroll.
holgerschurig · 2022-10-13 20:54
I'm using self-compiled git HEAD as well and noticed this new scrolling mode in the etc/NEWS file. I'm not going to use it ever, because moving from keyboard to the mouse for scrolling seems awkward to me. But still I tried it. It kind of worked, but it jumped by large quantities.
However, etc/NEWS explains that it won't work will all mice. So it might be expected what I observed.
Mice under Linux use libinput,and there are a lot of knobs to turn at that level. I didn't try it, but maybe that is a way to improve the experience? See the "xinput" binary.
valignatev · 2022-10-13 21:03
it doesn't work on windows either, so not sure what's the case. Might try to mess around with libinput settings, thanks
valignatev · 2022-10-13 21:04
I've confirmend that it's the case with C-h k and then scrolling. It sends out mhweel-up/down, and it's bound to pixel-scroll-precision
_hmenke · 2022-10-13 21:36
Hm, that's weird then, because if the touchpad and the mouse are sending the same events, why would Emacs treat them differently? Is the scrollwheel on the mouse ratcheting? Maybe that fixes the scroll amount to exactly one line.
terminal_cope · 2022-10-14 01:59
Same here. My mouse smoothly scrolls my browser, but jumps in line multiples in Emacs, meanwhile my trackpoint scroll is smooth in both. Both register as `mwheel-*` with `C-h k`.
elimik31 · 2022-10-14 14:48
Emacs-Wiki on [Smooth Scrolling](https://www.emacswiki.org/emacs/SmoothScrolling):
> Apply the following settings if you also want scrolling with an ordinary mouse to be almost as smooth as scrolling with a touchpad, on systems other than X:
>
> (setq pixel-scroll-precision-large-scroll-height 40.0)
>
> If that number does not work, decrease it by 5 at a time until it starts to. Keep in mind that setting it too low will cause normal trackpad scrolling to be interpolated, which is probably not what you want.
Maybe that can help.
valignatev · 2022-10-14 15:09
didn't work, unlucky. I've tried it on windows which is a system other than X
valignatev · 2022-10-14 15:11
That would be rahter weird implementation choice if true because free-spinning mouse wheels aren't that widespread, and all other programs do smooth scrolling just well with such mouse wheels.
Ghosty141 · 2022-10-14 15:23
> because moving from keyboard to the mouse for scrolling seems awkward to me.
I personally use it when exploring and reading code, scrolling through code and selecting passages.
valignatev · 2022-10-14 15:35
Same, there's really no reason to religiously prefer one or the other when you can ride both :)
terminal_cope · 2022-10-15 14:02
Also, why I like TrackPoints. Mouse and scrolling with hands on the home keys. Got a Shinobi keyboard to get mechanical goodness with a TrackPoint.