How to Enable Mouse Wheel Vertical Zoom Using AutoHotkey [Windows Only]

Disclaimer: This is a workaround using AutoHotkey, a very lightweight keyboard automation program for Windows, which is completely free. There are some known restrictions, but if you follow along correctly everything is going to work pretty much flawlessly and you probably might not even notice you are actually using a workaround. Generally, this should work similarly on macOS with Karabiner-Elements.

TL;DR: You may want to skip right to Step 4, if you already know how to use AHK, or are a bit lazy and feel like you can get this to work without understanding the concept behind it.

I have been using Cubase for not too long since the release date of version 10.5 and honestly find it mind-boggling that by now this basic feature has still not been natively implemented yet, like in literally any other actively developed DAW in 2020. There is plenty of feature requests on the forum about this topic, the early ones dating back to 2012, which speaks for itself.
I strongly suggest that the proper way to natively implement this is by giving the user a Mouse Wheel Modifiers section in the preferences just like already existent for the Editing-Tools Modifiers. This way everybody could tweak the behavior of the wheel in combination with modifiers to their liking. Please have a look at this post which goes into greater detail how it should be implemented the right way.

Already various times I have been helped by this forum, so I hope this post is going to help others as much as it has helped me, because I know how frustrating it can be not being able to use the mouse wheel for vertical zooming when you are used to this kind of workflow.

Instructions:
Step 1 – Download and install AutoHotkey from the official website: https://www.autohotkey.com/
Step 2 – Create a new empty AHK file
Desktop > right-click > New > New AutoHotkey Script
Step 3 – Open the file and paste the following code
Note: This step is mainly for demonstration purposes! If you already know how to use AHK, feel free to skip to Step 4, where we are going to optimize the communication between Cubase and AHK. We are now going to tell AHK in simple scripting language what to emulate when pressing Alt+MouseWheel. In this first example we will be using the default Cubase key commands. Text subsequent to a semicolon {;} is a comment purely to clarify the process and will be ignored by AHK for the remainder of the line.
right-click file > Edit Script

; Hotkeys on the left side of the double colon {::} will trigger the commands on the right side.

#IfWinActive ahk_class SteinbergWindowClass		; This will only enable the following modifications while Cubase is the active window

  ;/Alt+MouseWheel for vertical zooming
	!WheelUp::Send {AltUp}{ShiftDown}h{ShiftUp}	; {!} is interpreted as Alt
	!WheelDown::Send {AltUp}{ShiftDown}g{ShiftUp}	; {AltUp} is needed since we are physically holding down the {Alt} key, but we don't want Cubase to receive it

#IfWinActive						; End of Cubase context sensitive hotkeys [Optional]

When you now launch the script, everything should work given that you are using the default key commands for zooming.
Step 4 – Optimizing the communication between Cubase and AHK
Note: Usually AHK does a really great job solely sending the desired keystrokes on the right side of the double colon when detecting the hotkey on the left side has been performed. However, I have noticed the Modifier [Ctrl, Alt & Shift] recognition system of Cubase is very aggressive and therefore difficult to overcome by AutoHotkey. The by far best solution is to set up custom key commands with correlating Modifiers in Cubase, so we can then tell AHK to simply pass through the currently pressed Modifiers to Cubase. This way we will avoid any possible interference with different physical/virtual Modifiers being down at the same time. Since we want to use Alt as the Modifier, we have to set up a combination containing Alt. I personally decided to use the keys to the very right of the number row {-} and {=}, but you may choose any Alt+key combination which is not already used yet.
Cubase > Edit > Key Commands…
[Alt±] Zoom – Zoom Out Vertically
[Alt+=] Zoom – Zoom In Vertically

#IfWinActive ahk_class SteinbergWindowClass
	
  ;/Alt+MouseWheel for vertical zooming
	!WheelUp::
		Send {Blind}{=}		; {Blind} passes through all currently pressed Modifier Keys, {Alt} in this case
		Send {Blind}{=}		; Repeat a second time, as I find it a bit slow otherwise and after a while fatiguing for the wrist [This is optional, so feel free to leave it out]
		Return			; Return is obligatory for all multi-line commands to tell AHK where the current hotkey ends

	!WheelDown::Send {Blind}{- 2}	; Adding { 2} inside the same brackets after the key means sending the keystroke two times [Optional]
					; Exactly the same result as above, but using a single line, so 'Return' is not necessary


  ;/Shift+MouseWheel for forcing the system wide standard of scrolling up = scrolls left, like in every other program [Optional]
	$+WheelUp::Send {Blind}{WheelDown}	; {+} is interpreted as Shift
	$+WheelDown::Send {Blind}{WheelUp}	; {$} is needed in this particular case, because we have WheelUp/Down on both sides of the double colon. 
						; This way we prevent a potential endless loop where the right side would retrigger the left side.

#IfWinActive

Step 5 – Enjoy zooming vertically with the mouse wheel!

That’s it! I have not run into a single issue since using the code described in Step 4. Please be aware that the code from Step 3 is flawed, because apparently AutoHotkey cannot entirely hide the AltDown-State from Cubase, which ends up in sometimes sending Alt+G or Alt+Shift+G (et cetera), which will feel unresponsive and possibly at worst execute undesired commands. I highly suggest setting up the version described in Step 4. If you find the vertical zooming is not fine enough you can only send the keystroke once; if you find it too slow you can send it multiple times instead. I am happy to answer any questions, but first please read carefully and try out all of this yourself, as it should work pretty much ‘out of the box’.

For further disambiguation of the used symbols, please have a look at the well-structured AutoHotkey manual: Hotkeys - Definition & Usage | AutoHotkey

5 Likes

That looks interesting!

So I would need to add the code from step 4 at the end of my autohotkey script? (or should I add both codes?)

What else must I change in cubase or the script?

I took the plunge and tried it, just the first script, and used alt+o and alt+l and it works like a charm!
very sparingly I notice that some other keys are being sent but nothing terrible.

I don´t understand what the second script does, so I left it alone.

Thanks very much!!! this should be a sticky, my workflow has improved tenfold!!!

1 Like

This has got me thinking, now that we have keycommands for zooming the wave inside the event, how would a script for this look like? maybe we can use Shift+Ctrl+Wheel?

Hello Pablo, I am glad you are able to make good use of this workflow enhancement. For the most part I couldn’t work properly without it!
Waveform zoom should be possible with the exact same steps. I have updated the code down below accordingly for you, but haven’t verified this myself. It should work though.
Remember that you still have to manually set the respective KeyCommands in Cubase (or change them to your liking and in return exchange the letters o & l in the script). If you find the scrolling too fast you can simply delete the ’ 2’, if still too slow you can simply input a higher digit.

#IfWinActive ahk_class SteinbergWindowClass
	
; /Alt+MouseWheel for Vertical Zoom 
  ; -->[Set Alt+O and Alt+L in Cubase KeyCommands]<--
    !WheelUp::Send {Blind}{o 2}
    !WheelDown::Send {Blind}{l 2}
				
; /Ctrl+Shift+MouseWheel for Waveform Zoom 
  ; -->[Set Ctrl+Shift+O and Ctrl+Shift+L in Cubase KeyCommands]<--
    ^+WheelUp::Send {Blind}{o}
    ^+WheelDown::Send {Blind}{l}

#IfWinActive

Thanks! I will check them out,

I have made one for clip gain, so now with the new combined selection tool I can select a region, crop it with a button of my mouse, and modify the clip gain with shift+alt+wheel. All in a single movement!

This sould be a sticky!!!

Thanks a lot! It was really helpfull :slight_smile:

Any way to get this to work inside the new Cubase 12? The above script was working flawlessly for Cubase 11 however once updated to the C12, it stopped working

Is this not working in cubase 12???

this and the generic remote going to be disabled makes me very wary about my future in Cubase

Works for me on 12 just fine :ok_hand:t2:

Nice work here!

I’m not sure; would it be possible to use auto hotkey to set “Mousewheel = horizontal zoom (g and h)” and still keep alt mousewheel to be vertical zoom?

Edit:

Seems to work.
I added:

WheelUp::
	Send {Blind}{h}		; 
	Send {Blind}{h}		; 
	Return			; 

WheelDown::Send {Blind}{g 2}	;

What a genius, this work like a charm.
What If I want to use SHIFT + mouse wheel to change quantize settings? Or any key-modifier+mousewheel to change quantize settings

Is this possible with autohot key ?

Do you mind sharing the script to get it to work on C12? :pray:t2: I’ve been stuck using C11 due to this.

Anyone else get it to work inside Cubase 12 version?

1 Like

Hi Node01,

I’ve just followed the above steps and they work for me on Cubase 12. I fine-tuned the script to my liking but you are welcome to give it a try.
cubase mouse zoom fixes.zip (1.1 KB)

After setting up the relevant key modifiers in Cubase and running the script, this is how my mousewheel / Zooming is working now.
; mousewheel with no modifiers = Vertical Scroll
; SHIFT + mousewheel = Horiztontal Scroll
; ALT + Mousewheel = Zooms In / Out at playhead position
; CTRL + ALT + Mousewheel = Zooms In / Out at cursor position
; CTRL + Mousewheel = Global track height control aka Vertical Zoom In / Out
; CTRL + UP (on the arrow keys) = Vertical Zoom IN on selected tracks
; CTRL + DOWN (on the arrow keys) = Vertical Zoom OUT on selected tracks
; CTRL + SHIFT + Mousewheel = WAVEFORM Vertical Zoom IN / Out

1 Like

do you know if this work with Cubase 13? I have some bindings that work perfectly in c12 but they are not working with c13…

maybe is the SteinbergWindowClass line? perhaps something changed?

ok, autohotkey windowspy gave me the answer now you have to use SteinbergWindowClass턠ʤ

(don´t ask me why those characters)

1 Like

Had to use this in Cubase 13 to get everything working. Waiting to upgrade to Pro. Just change inside the " " to the exact .exe name and it will work seamlessly.

#HotIf WinActive("ahk_exe Cubase LE AI Elements 13.exe")
^WheelUp:: Send "{Blind}{WheelDown}"
^WheelDown:: Send "{Blind}{WheelUp}"
!WheelUp:: Send "{Blind}{=}"		; In Cubase --- map alt + - (for Zoom Out) and map alt + = (for Zoom In) - Sets Alt Zoom like Pro Tools 
Return			                ; Return is obligatory for all multi-line commands to tell AHK where the current hotkey ends
!WheelDown::Send "{Blind}{- 2}"	 ; The (-) is the key mapped following the ALT press.... 2 in the brackets adds zoom speed
$+WheelUp::Send "{Blind}{WheelDown}"	; Changes Shift Horizontal zoom to normal directions like all other daws
$+WheelDown::Send "{Blind}{WheelUp}"
$^+WheelUp::Send "{Blind}{WheelDown}"	; Changes Ctrl + Shift for Track Resize Wheel Down Zooms All Tracks In as expected
$^+WheelDown::Send "{Blind}{WheelUp}"	

Thanks so much for the mapping of the alt shortcuts, that fixed all my struggles with trying to use AHK to map ALT +Mousewheel for Zooming like it is in Pro Tools.

#HotIf WinActive(“ahk_exe Cubase LE AI Elements 13.exe”)