-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invert scroll direction if "natural scolling" is used #112
Comments
This is not the first time this issue is raised (#89). I wanted to say that you should raise an issue there, but it seems like it would be a duplicate of this issue, which points to another issue on GTK. |
Regarding the logic you laid out: It seems like the way it should be done, perhaps adding an option to enable it regardless if natural scrolling is being used or not. As I mentioned before, I'm not sure if this is the project where to implement it though. |
Wow, thanks for the pointer. Sounds like a mess. It is indeed true that this behavior is mirrored by scrolling on other UI elements that do not move (e.g. the volume slider in top right settings dropdown). I voted for the issue in the gtk repo but I definitely do not have the experience to tackle that. That said, mpris-label is by far the thing I scroll on the most besides my web browser, so I'd personally like to fix it even if ideally it would be fixed upstream. If we don't have enough information in the scroll event to tell whether natural scrolling is being applied it may not be possible though. |
Do you know if scroll-event signal is documented anywhere? I could try to play with that. |
I was able to figure out how to get it in |
When natural scrolling setting is enabled, the scroll inputs are essentially the opposite of what's actually physically happening. This is fine for scrolling down a page, but feels very weird for things like volume control. Invert natural scrolling inputs so scrolling up actually increases the volume, and vice versa. Fixes Moon-0xff#112.
Scrolling on a laptop touchpad can use "Traditional" or "Natural" mode:
The "natural" mode works quite well for scrolling content, e.g. webpages, especially when super-precise smooth scrolling is enabled.
However, it also inverts the scroll direction for this extension, which means that the volume increases when you pull down your fingers, which doesn't make much sense.
Complicating the issue: I also often use a mouse with my laptop, and I don't want that to be inverted! It already works correctly. So ideally the logic is:
The traditional/natural scrolling can presumably be read from wherever GNOME stores that setting. I'm not sure how to detect if the scroll input is coming from a touchpad or mouse. I spent some time trying to find documentation on the scroll-event signal but my lack of experience here was showing. There may be some metadata on event that we can use, but I wasn't able to find any conclusive docs on this.
I'd be glad to put in some more effort on making the code change here given some pointer from a maintainer.
The text was updated successfully, but these errors were encountered: