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: https://www.autohotkey.com/docs/Hotkeys.htm


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!!!

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:

The zooming inside Cubase seems to move in blocks. Is is there a way to make the scroll smoother so that it zooms in smaller degrees without having to jump?