photoshop -> script for using ctrl+mouse_wheel for zooming doesn't work

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
MHHM_88
Posts: 1
Joined: 05 Aug 2021, 09:09

photoshop -> script for using ctrl+mouse_wheel for zooming doesn't work

05 Aug 2021, 09:20

Hi all,

I'm a beginner. I tried this script for photoshop (posted on t.ly/QOpA):

Code: Select all

#IfWinActive ahk_class indesign
;Middle mouse button moves the page
    MButton::
    Send {Space Down}{LButton Down}
    Keywait, MButton
    Send {LButton Up}{Space Up}
    Return
;Map Ctrl+Wheel to do Alt+Wheel
    ^WheelUp::!WheelUp
    ^WheelDown::!WheelDown
#IfWinActive
The issue is: "Middle mouse button moves the page" works, but "Map Ctrl+Wheel to do Alt+Wheel" doesn't work!

I hop anyone can help me with it,

Thanks in advance :)
User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: photoshop -> script for using ctrl+mouse_wheel for zooming doesn't work

11 Aug 2021, 06:01

I don't think you can do a remap with two keys, because remapping is used to map something to a single key. You can use Send instead.
User avatar
boiler
Posts: 16900
Joined: 21 Dec 2014, 02:44

Re: photoshop -> script for using ctrl+mouse_wheel for zooming doesn't work

11 Aug 2021, 06:38

You can remap a key with modifiers, but remapping does not release the modifier key. It is like a “blind” hotkey, so remapping a modified key to a different modifier with that key won’t really work unless the desired outcome is another modifier in addition to that one.
Remapping Keys wrote:…a remapping never "releases" the modifier keys which are used to trigger it. For example, A::b is typically equivalent to A::B and ^a::b is equivalent to ^a::^b. This is because each remapping internally uses {Blind} to allow the key or key combination to be combined with other modifiers.
So, as mikeyww suggested, the solution is to create a hotkey and use Send instead because the modifier key(s) will be released as long as {Blind} isn’t used.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ntepa and 242 guests