DanielBoxer / VSCroll

Smooth middle mouse button scrolling for VS Code or any other application
GNU General Public License v3.0
14 stars 1 forks source link

Mouse click should cancel scroll mode #3

Closed xmedeko closed 1 year ago

xmedeko commented 1 year ago

Watching Firefox, when in scroll mode (after MButton click), then:

Also, changing focus out of Firefox cancels scroll mode. Maybe detecting focus change is hard in Autohotkey, so IMO it's enough implement scroll mode cancelling on mouse click even when outside of VS Code.

E.g. do MButton click in VS Code, then Alt+Tab change to another app - I still see the scroll symbol and cannot cancel that. I have to return to VS Code to cancel it (by MButton only).

DanielBoxer commented 1 year ago

Good idea, I’ve also had this happen a few times before. The script now cancels scrolling if VS Code loses focus. I also added pass though hotkeys for left click, right click, and alt so you can stop scrolling with those keys in VS Code while still retaining their original events. Alt is for when you press Alt+Tab, so it has enough time to activate the 4 small scrolls before changing windows. Though if you don’t use smooth scroll, you could change it to ~Alt & ~Tab.

xmedeko commented 1 year ago

Works perfectly, again. Thanks.