Navigating the viewport with: your choice of hotkeys.


[b](For Windows)

                  See [post #2]( for using the mouse scroll wheel to cycle through four views.
              See [post #10]( for many other ways to use AHK with Max or any program.
             [/b][b]Would you like to hold down "a" (or any key) and move the mouse to zoom or orbit?
                                                   (no clicking at all!)[/b]
             You can accomplish this by using a free program called [AutoHotkey](
                                                   All you are going to have to do is, download it, install it,
                                                   and copy and paste the scripts I've already made for you;
                                                   which I'll show you how to easily modify, if you want to use another hotkey.
                                                   Once you have AutoHotkey installed:
                                                   make a scripts folder,
                                                   or just right-click
                                                   in any folder, or on the desktop
                                                   and Goto:
                                                   New→ AutoHotkey Script
                                                   Name it whatever you want;
                                                   then right-click it
                                                   choose "Edit Script"
                                                   and then paste the script I have provided
                                                   below the text that is already in there.
                                                   Then save and you're done.
                                                   [b][a] for zoom,
        [s] for orbit
        [space] for pan:[/b]
 #IfWinActive ahk_class 3DSMAX ; this script only works inside of Max
          ; ==== Pause ====
                               pause::suspend ; press [pause] if you need the [a] or [s] key to type inside of max
          ; ==== Zoom ====
                               a:: ; change the [a] hotkey if you want
         send, {ctrl downtemp}{alt downtemp}{mbutton down}
        keywait, a ; waits for [a] to be released -- if you change [a] above change it here too
         send, {mbutton up}{ctrl up}{alt up}
        return ; end hotkeys with this
          ; ==== Orbit ====
        send, {alt downtemp}{mbutton down}
        keywait, s
        send, {mbutton up}{alt up}
          ; ==== Pan ====
        send, {mbutton down}
        keywait, space
        send, {mbutton up}
          ; ==== Exit ====
                               esc::exitapp ; [esc] closes the script... you can delete this line if you want.

(I don’t know what’s up with the random indentation the code tags produce…)

                       Because apparently some people prefer the zoom tool,
                       here's an alternative that uses the zoom tool but functions the same as above:
                send, !{z 1}{lbutton down} ; switches to the zoom tool and holds left mouse down
               keywait, a
               send, {lbutton up}{q} ; releases left mouse and switches to the select tool
                [b]Advanced functionality:[/b]
                  Tap [a] once and it act's like a normal [a]
                  Hold [a] and it zooms
                  Double tap [a] and it is [ctrl]+b[b]
      keywait, a, t0.3 ; waits for [a] to be released
      if errorlevel
      sendinput, {ctrl downtemp}{alt downtemp}{mbutton down}
      keywait, a
      sendinput, {mbutton up}{ctrl up}{alt up}
      keywait, a, d, t0.3 ; if [a] is pressed again in 0.3 seconds it sends [ctrl]+[b]
      if errorlevel ; otherwise it sends [a]
        send, a
        send, ^b
                                                  The first and second links have all the info for
                                                  what you might want to press;
                                                  and the third has what you will want the script to press.
                                                 [u]To run the script:[/u][/b]
                                                 double click on it,
                                                 or a shortcut of it.
                                                 [u][b]To suspend the script,
                                                 or end it:[/b][/u]
                                                 right-click the green square with the white H
                                                 in the bottom right (system tray).
                                                 [b]If you need to type inside of Max,[/b]
                                                 and make use of the 'a' and 's' keys,
                                                 you can just suspend it (pause button).
                                                 I hope you enjoy this. ;-]


Scroll up with the mouse wheel to cycle through four views and “zoom extents selected” each.
In max I have
“zoom extents selected” as [d]
“front view” as [ctrl] + [alt] + 1
“right view” as [ctrl] + [alt] + 2
“back view” as [ctrl] + [alt] + 3
“left view” as [ctrl] + [alt] + 4

wheelup:: ; use mouse wheel up
    If (TimesCalled = 5) ; on the 5th use (wheel up notch) start again at the beginning
    If (TimesCalled = 1) ; on the first use
    Send, ^!1 ; front view
      send, d ; zoom extents selected
    Else If (TimesCalled = 2) ; on the second use
    Send, ^!2 ; right view
      send, d ; and so on...
    Else If (TimesCalled = 3)
    Send, ^!3
      send, d
    Else If (TimesCalled = 4)
    Send, ^!4
      send, d
This doesn't have to be for the mouse wheel,
it could be for tapping any hotkey;
and it doesn't have to be four things,
it could be 2 or 7 or whatever.

Scroll down for top view.
The way this is written allows us to scroll down with the mouse wheel
and have it send [t]
but also allows for us to hold modifier keys (shift, ctrl, alt)
and scroll down to simulate [shift] + [t]
which I use as perspective view.
It also includes my “zoom extents selected”
the [d] key.

  send {blind}t
  send d


instead of

a::send {Ctrl down}{Alt down}{Mbutton down}
a up::send {Ctrl up}{Alt up}{Mbutton up}

you should use

which will evaluate faster because you're directly mapping the keys. I prefer doing this way with the commands where you keep holding your mouse button instead of clicking.

Here’s another tip.

Send, {MButton}
Send, !{w}

When you’re maximizing your viewport you’ll no longer have to select the viewport first. Just hover your mouse on the viewport you want to maximize and click ctrl+w.

The benefit of using send is that you can still use a hotkey like [alt + a]
which is part of MAX. Direct mapping doesn't allow [a] to be used again.

Have you tried your suggestion? It pans instead of zooming.

          Very useful.
          Preferring Maya's hotkey: 
        I first set "Maximize Viewport Toggle" to spacebar in max,
          then modified the script.

              send {mbutton}{space}

I’m now using space as pan (photoshop / illustrator carry over)
and hotkeys to switch views instead of minimizing to the four views.

Also, for the sake of information,
there is a Max script that auto selects a view that you move the mouse to,
if you like minimizing and using the four views.


Thanks for the pointer to AutoHotkey. It is most useful, and I especially like the ability to confine the changes to a single App (3DS Max).

I prefer to stick to my old habits, the Maya ALT+ mousebuttons, since that is what I have Maya and Mudbox set to. I got two out of three right, mapping ALT+LMB to orbit and ALT+RMB to zoom. ALT+MMB still does orbit, because I haven’t figured out how to trap the ALT, maybe you can’t. But if you let the ALT key go, it drops to pan mode immediately.

I won’t repeat all the stuff about starting with AutoHotkey, or the link, see Honest Abe’s posts above for that. But here is the part of the script I made, paste it at the bottom of the default script:

 ; for 3DS
 #IfWinActive ahk_class 3DSMAX
 SendInput, {MButton Down}
 KeyWait, LButton
 SendInput, {MButton Up}
 SendInput, {Alt Down}{Ctrl Down}{MButton Down}
 KeyWait, RButton
 SendInput, {Ctrl Up}{Alt Up}{MButton Up}

<* Wes *>


Hey Wes,

 I'm happy to see you have found the joy of AHK.
 When I originally posted this topic
 it included those Maya hotkeys.
 It's actually what I first wanted to accomplish.
 The reason I remove them from this topic is that
 alt + click is the deselect in Max,
 as I'm sure you know.
 Of course this isn't a problem if you setup another hotkey,
 to deselect, with AHK.
 For example:
     send !{lbutton}
      sendinput, {alt down}{lbutton down}
      keywait, xbutton1
      sendinput, {lbutton up}{alt up}
 As a whimsical aside:
 have you noticed that if you release
 left click first: it cancels orbit as you would expect
 but if you release alt first:
 it switches to pan?
 Could be useful ;-]
 I could not get the alt+mbutton pan working either,
 the closest I came was a crazy pan and orbit at the same time hybrid LOL.
 I thought maybe #usehook or $ at the beginning might help,
 but no luck.
 Assume anything is possible with AHK,
 and seriously take advantage of the AHK forums.


Thanks for the tip on deselect. No, I am not that proficient in 3DS Max… yet. In the past I have managed to set most things I use up to navigate Maya-style, and I missed that on Max. For me, I would trade other inconveniences for being able to navigate without thinking, letting muscle memory take over.

I got all three buttons working with ALT, and it seems to perform well enough… as you noted, releasing the ALT key in the middle of the process switches from orbit or zoom to pan, but I am happy for the moment, because that is not a habit I will need to break.

Here is the three-button solution (takes advantage of Ctrl-p left being mapped by default to pan):

; for 3DS
 #IfWinActive ahk_class 3DSMAX
 ; makes ALT+LMB perform orbit (native 3DS ALT+MMB)
 SendInput, {MButton Down}
 KeyWait, LButton
 SendInput, {MButton Up}
 ; makes ALT+RMB perform zoom (native 3DS CTL+ALT+MMB)
 SendInput, {Alt Down}{Ctrl Down}{MButton Down}
 KeyWait, RButton
 SendInput, {Ctrl Up}{Alt Up}{MButton Up}
 ; make ALT+MMB perform pan (Native 3DS MMB, uses CTL-P definition)
 SendInput {Ctrl Down}{p Down}{LButton Down}
 KeyWait, MButton
 SendInput, {Ctrl Up}{p Up}{LButton Up}
 SendInput, {MButton Up}
 SendInput, {RButton Down}	;sent to clear the lagging hand cursor
 SendInput, {RButton Up}

Tested on Max 2012 and Windows 7 (both 64-bit).

<* Wes *>


I’m glad to see you got it to work.

You could cut out two lines if you wanted to:

   sendinput, {ctrl downtemp}{p down}{lbutton down}
   keywait, mbutton
   sendinput, {ctrl up}{p up}{lbutton up}
   sendinput, {rbutton}

I’m always looking for a way to simplify ;-]
and in fact you might have helped me do that.

  sendinput, {ctrl downtemp}{alt downtemp}{mbutton down}
  keywait, a
  sendinput, {ctrl up}{alt up}{mbutton up}

So far no failed releases…
we will see how it holds up to testing. :-]

I noticed that your orbit isn’t engaging a lot.
I think this is because you are relying on the pressed alt;
rather than, including it with the sendinput.

Adding it with the sendinput seems to prevent that from happening:

   SendInput, {alt downtemp}{MButton Down}
   KeyWait, LButton
   SendInput, {alt up}{MButton Up}

○ • ☼ • ○

Have you seen that AutoDesk certified driver 275.89 for the Quadro 4000 and Max2012?
I have not checked Maya and Mudbox.


See the original post for a new advanced script,
that allows [a] to function differently depending on how you press it.
See the second post for a script to cycle views with the mouse scroll wheel.

 === ☼ ===
 There are so many useful possibilities with AHK,
 I wanted to share some more.
 You can make mouse menus:
          Radial menus:
          Mouse Gestures:
          [link]( (I use this one)
 [link2]( (untested)
 [link3]( (untested)
          Tap, double tap and/or hold keys for different results:

link4 (triple tap)

 Other ways to have one key do different things depending on how many times you
 press it (like my mouse wheel cycling views script):
 [link]( (all untested)
 [link2]( (untested)

You can use any key like a modifier key (ctrl, alt, shift)
If you don't redefine the button you use as a modifier (like at the bottom of the example)
it will do nothing when pressed alone.
space & a::
    sendinput, {f12}
    space::send {space} ; sends space upon release if nothing else is pressed
You can make use of the extra buttons on your mouse:
       sendinput, {alt down}{lbutton down}
       keywait, xbutton1
       sendinput, {lbutton up}{alt up}
You can make your mouse instantly move to any location 
(via coordinates found with the window spy) and click:
     send {click 1605,105}
    sleep 100
    send {click 1728,165}
That clicks the modify panel then opens the drop down list,
but I'm guessing the coordinates only work on a screen my size at 1920x1080.
I think a custom quad menu is really the way to go for modifiers anyhow.

I hope you've enjoyed stumbling onto the mother-load of hotkey magic.


I like the idea of using autohotkey to optimize workflow.
Can you make MODO/LW style navigation? In my opinion it is the best for wacom, because you don’t have to use stylus side buttons.
It’s like this
Orbit - Alt+LMB
Zoom - Alt+Ctrl+LMB
Pan - Alt+Shift+LMB

I made Orbit and Zoom but got stuck with Pan. I searched forums and it seems that i’m not only one who have a problem with Alt+Shift+LMB combination in 3dsmax.
Can somebody help me?


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.