mouse-scroll-wheel-acceleration-userspace icon indicating copy to clipboard operation
mouse-scroll-wheel-acceleration-userspace copied to clipboard

Clarifications would be nice to have

Open chang-zhao opened this issue 3 years ago • 7 comments

It seems that sometimes (slow) scrolling is not triggered; also running

./main.py -v --exp 1

gives config.py not found.

It would be nice to have some explanation

  • what to write in that config.py,
  • and how to make the acceleration faster (I'd like two mouse wheel clicks to scroll a page. Or actually even one click to scroll a page).

Logitech USB Optical Mouse (a cheap 3-button) Manjaro, XFCE

chang-zhao avatar Apr 04 '21 18:04 chang-zhao

config.py not found

I think this is only a warning or just note, right?

It would be nice to have some explanation what to write in that config.py

Yea. Although I also would just recommend to check the code itself, as it is pretty simple:

https://github.com/albertz/mouse-scroll-wheel-acceleration-userspace/blob/509bdfd60a53e7fceb20fbf9ad0b6ecf41ede5a6/main.py#L160

I.e. you define the default arguments, e.g. you could set e.g. this in the config.py:

multiplier = 1
exp = 1

It seems that sometimes (slow) scrolling is not triggered

What exactly do you mean? You mean the acceleration is not triggered by slow scrolling?

With -v, do you see that it recognizes the scroll events?

how to make the acceleration faster

Have you tried playing around with setting multiplier or exp higher?

albertz avatar Apr 04 '21 20:04 albertz

config.py not found

I think this is only a warning or just note, right?

Yes.

It seems that sometimes (slow) scrolling is not triggered

What exactly do you mean? You mean the acceleration is not triggered by slow scrolling?

Disregard that. I meant that occasionally turning the wheel didn't result in any scrolling at all. But that must be a bug of xfce4-terminal: after focusing on its window, the first mouse wheel turning (rotation click) had no effect.

chang-zhao avatar Apr 04 '21 22:04 chang-zhao

occasionally turning the wheel didn't result in any scrolling at all

The script should just add additional scroll events but not remove any. With -v, you also should see all the scroll event it detects. If you don't see that it lists the scroll event, this might be on the hardware side or driver side, that it just did not detect the wheel scroll. Some cheaper mouses have the scroll wheel making these clicks, but each click does not necessarily 100% map to a scroll event.

albertz avatar Apr 05 '21 10:04 albertz

Some cheaper mouses have the scroll wheel making these clicks, but each click does not necessarily 100% map to a scroll event.

My mouse is a usual Logitech M90, I use them for years and sure they don't do such things. It must be a software problem, perhaps in xfce4-terminal or something, as that phenomenon is quite consistent.

PS. It's not only Terminal Emulator's issue. Thunar File Manager has the same behavior: focus the window (files area, in this case), try to scroll - the first "click" has no effect.

chang-zhao avatar Apr 05 '21 11:04 chang-zhao

I see. But do you see that it detects the scroll event? (With -v, you should see all the scroll events.) (And just to be sure: This is totally independent now of this accelerator, right? This problem also occurs when you do not run the accelerator?)

If yes (there was a scroll event but the scroll has no effect in the app), then this is a problem in those apps, how they handle scroll events.

If no (there was no scroll event), then this might be a driver or configuration issue (in Xorg or so).

Which one is it?

albertz avatar Apr 05 '21 22:04 albertz

I think you mean that scroll events are shown like

2021-04-06 05:34:26,492 INFO: scroll user vel 1.38 -> accel multiplier 1.38, cur vel Vec2(0.00, 1.38), target vel 1.89 -> scroll Vec2(0.00, 0.52)

Well then,

  • the first scroll "click" after hovering (or clicking) the scrollable area never has any effect in programs like Terminal; though it always works in some other programs like Thunderbird. (Does main.py work in the background or not, makes no difference.)
  • Any single scroll "click", even if it scrolls (in whatever program) does not result in "INFO" output of ./main.py -v --exp 1. I get "INFO" output only when 2 or more scroll clicks happen in a short time.

chang-zhao avatar Apr 06 '21 05:04 chang-zhao

I think you mean that scroll events are shown like 2021-04-06 05:34:26,492 INFO: scroll user vel ...

No, actually I meant messages like on scroll, via this code: https://github.com/albertz/mouse-scroll-wheel-acceleration-userspace/blob/509bdfd60a53e7fceb20fbf9ad0b6ecf41ede5a6/main.py#L81

But I realize now, I think you need -vv (higher verbosity setting) to enable that.

Any single scroll "click", even if it scrolls (in whatever program) does not result in "INFO" output of ./main.py -v --exp 1. I get "INFO" output only when 2 or more scroll clicks happen in a short time.

Yes, that was my fault. You need -vv, and I referred to the other on scroll message (which you should see on every single scroll event). You are right, this scroll user vel event will only be shown once the acceleration actually kicks in (which needs at least two scroll events, because it is based on the velocity, which it calculates based on the scroll events).

the first scroll "click" after hovering (or clicking) the scrollable area never has any effect in programs like Terminal; though it always works in some other programs like Thunderbird.

Ok, this looks like some issue with those apps then (or their framework; maybe that is Qt? GTK?). Maybe it is also their intended behavior. You might report to them.

(Does main.py work in the background or not, makes no difference.)

Ok, that's good to know.

albertz avatar Apr 06 '21 08:04 albertz