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:
- Check if the scroll event is coming from a touchpad or a mouse. If coming from a mouse, use current behavior.
- If coming from a touchpad, check if natural scrolling is enabled. If yes, invert the scroll direction. Otherwise use current behavior.
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.
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.