shader wrote:
I just want to use the click and drag in conjuction with a modifier key (like alt, control, shift) to do things like zoom in the browser.
I understand. Thanks for bringing this up, it is something I had considered, and seen intermittently work before (perhaps because I pressed the modifier key after starting scrolling). I will look more into this for the next release; there may be some unintended side effects, but this should work for you for now. Please let us know how this change works for you over time.
The issue here is that DtS is activated by the
hotkey command which requires that you specify any modifier keys, and only works when those keys (or none) are held down when clicking the hotkey. You need to request that the hotkey be trigged regardless of any keys being held down, with the "
*" hotkey modifier. DtS will essentially ignore the extra keys being held down and function as normal, however the targeted app should receive the simulated mousehweel and the modifier key. This should get you zooming in Firefox, etc.
Make the changes shown in red:
Code:
mnuEnabled:
ScrollDisabled := !ScrollDisabled
ToolTip("Scrolling " . (ScrollDisabled ? "Disabled" : "Enabled"), 1)
GoSub, DragStop ; safety measure. force stop all drags
mnuEnabledInit:
if (!ScrollDisabled)
{
Menu, TRAY, Check, Enabled
Menu, TRAY, tip, Drag To Scroll v%VERSION%
HotKey, *%Button%, ButtonDown, On
HotKey, *%Button% Up, ButtonUp, On
;HotKey, ^%Button%, DisabledButtonDown, On
;HotKey, ^%Button% Up, DisabledButtonUp, On
HotKey, ~LButton, ToolTipCancel, On
}
else
{
Menu, TRAY, Uncheck, Enabled
Menu, TRAY, tip, Drag To Scroll v%VERSION% (Disabled)
HotKey, *%Button%, Off
HotKey, *%Button% Up, Off
;HotKey, ^%Button%, Off
;HotKey, ^%Button% Up, Off
}
Gosub, UpdateTrayIcon
Return
A few caveats/issues with this change:
- This will only work with the "WheelKey" and "WheelMessage" modes (the default)
- This interferes with the Ctrl-Click (^) hotkeys which forces disabling DtS, so those hotkeys were commented out
- The speed will probably be faster than you'd like, as it was designed for scrolling longer documents, not rapidly changing font size
You can adjust this and maybe find a happy medium in "All Settings". You'll also get momentum on zooming, if its enabled.
If you'd like to extend DtS' gestures (flicking Up/Down/Left/Right), you'll have to make the above change, as well as detecting the modifier keys in the gesture handler. Something like:
Code:
GestureU:
if (GetKeyState("Alt", "P"))
{
MsgBox, Gesture Up while holding Alt
return
}
...
Return