Created
May 16, 2018 18:19
-
-
Save stash/c16a3984b4da8424fd9c9a6a207e292f to your computer and use it in GitHub Desktop.
Logitech gsuite script for middle-mouse button panning in illustrator and photoshop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The following code is in the public domain | |
-- | |
-- Logitech g-suite script that binds middle mouse button to "SHIFT + LMB" | |
-- | |
-- Holding spacebar in Illustrator or Photoshop (CC 2018-ish) allows you to pan the screen around with a left mouse drag | |
-- | |
function OnEvent(event, arg) | |
if (event == "MOUSE_BUTTON_PRESSED" and arg == 3) then | |
-- 57 == 0x39 == "spacebar" | |
PressKey(57); | |
PressMouseButton(1); | |
end | |
if (event == "MOUSE_BUTTON_RELEASED" and arg == 3) then | |
ReleaseKey(57); | |
ReleaseMouseButton(1); | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment