ZBrushCentral

Workaround: Navigation Hotkeys

Here’s a workaround if you’d like hotkeys for navigation in ZBrush; It requires AutoHotkey.

 If  you're not already a user of this nifty little program:
 Install it, right click it's Tray Icon, choose Edit This Script. Replace all the text with the code below. You'll need to adjust some values in the script, so right click the Tray Icon again and choose "Window Spy"; With ZBrush open place your mouse over the navigation buttons in ZBrush and take note of what Window Spy says about the "On Screen" mouse position; Adjust the X and Y positions in the script for each tool button.
 
 Save the script, right click the Tray Icon yet again and choose Reload This Script. If you got the positions right, the Left Arrow key on your keyboard should now trigger Move, Down Arrow should trigger Scale, Up Arrow key should trigger Scroll and the Right Arrow key should trigger Rotate. 

If you don't care much for my chosen hotkeys (I'm left handed...) you can always replace "Left:small_orange_diamond:", "Down:small_orange_diamond:" etc. with whatever keys you want - Even joystick buttons and racing wheel pedals can be used if you're crazy enough  :D 
#NoEnv
        SendMode Input
        
        ;if you want a custom tray icon...
        ;Menu, Tray, Icon, D:\AutoHotkey Scripts\ZBrush.ico, , 1
        
        
        ;prevent user from screwing things up... :)
        BlockInput, SendAndMouse
        
        ;important! Check whether this is ZBrush
        #IfWinActive, ahk_class ZBrush
        
        ;Left Arrow Key, change it to whatever you want together with "KeyWait" further down
        Left:small_orange_diamond:
        	;grab current mouse pos
        	MouseGetPos, OldPointX, OldPointY
        
        	;move to ZBrush's "Move" tool button - x pos, y pos, speed - ADJUST IT!
        	MouseMove, 1793, 366, 1
        
        	;simulate left mouse button
        	Send {LButton down}
        
        	KeyWait, Left
        	Send {LButton up}		
        		
        	;get back to old position
        	Sleep, 75
        	MouseMove, OldPointX, OldPointY, 1
        return
        
        
        ;Down Arrow Key, change it to whatever you want together with "KeyWait" further down
        Down:small_orange_diamond:
        	MouseGetPos, OldPointX, OldPointY
        
        	;move to ZBrush's "Scale" tool button - x pos, y pos, speed - ADJUST IT!
        	MouseMove, 1793, 408, 1
        
        	Send {LButton down}
        	KeyWait, Down
        	Send {LButton up}		
        		
        	Sleep, 75
        	MouseMove, OldPointX, OldPointY, 1
        return
        
        
        ;Up Arrow Key, change it to whatever you want together with "KeyWait" further down
        Up:small_orange_diamond:
        	MouseGetPos, OldPointX, OldPointY
        
        	;move to ZBrush's "Scroll" tool button - x pos, y pos, speed - ADJUST IT!
        	MouseMove, 1793, 125, 1
        
        	Send {LButton down}
        	KeyWait, Up
        	Send {LButton up}		
        		
        	Sleep, 75
        	MouseMove, OldPointX, OldPointY, 1
        return
        
        
        ;Right Arrow Key, change it to whatever you want together with "KeyWait" further down
        Right:small_orange_diamond:
        	MouseGetPos, OldPointX, OldPointY
        
        	;move to ZBrush's "Scale" tool button - x pos, y pos, speed - ADJUST IT!
        	MouseMove, 1793, 446, 1
        
        	Send {LButton down}
        	KeyWait, Right
        	Send {LButton up}		
        		
        	Sleep, 75
        	MouseMove, OldPointX, OldPointY, 1
        return

Is it possible with this program to reasign the CTRL, ALT, and Shift keys?

Yes, it is. What did you have in mind?

If you right click the tray icon and choose “Help”, you’ll open the help file; The 6th and 7th topic (“Hotstrings & auto-replace” and “Remapping keys and buttons”) should get you a long way. You can basically do whatever you like - Even rearrrange your whole keyboard.

Has anyone tried my script?

Well i just got an Intuos3 and was trying to set up the express keys as ctrl,alt, shift. but from whati’ve experienced they do not work the same as a regular keyboard, they are not persistant, so doing hiding in zbrush is impossible. If anyone knows a trick to get this to work correctly please let me know.
so i figured if i had the hotkey program set up as those keys i could tell my tablet to use the express keys as some other key that would in turn be a hotkey for ctrl alt etc.
i know its a crazy work around but i really want to just be able to sit here with just my tablet and zbrush away, without having a tablet and keyboard on my lap. (I dont have a computer desk)

Setting up a workaround wouldn’t be much work at all, but to set up persistent (stays “down” the whole time you press it down) keys is something the Intous3 setup application really should be able to do…

If it is anyhing like the application for Intous2, you find the dropdown-menu for your button and choose “Modifier…” (not “Keystroke…”!). Is “Modifier…” the method you’re using, but it’s not working?

Actually yes they are set to Modifier, and from what i’ve experienced is this, each key is persistant by itself, but if you do a combo, say Ctrl+ALt, it now will read that action but continue to only read the second key as persistant, so if you let off of ALT while still holding CTRL it doesnt see that you’re still holding CTRL.
Try doing a simple hiding action in zbrush, it wont work.
And now that i realize that they are not continually persistant the hotkey program still won’t help.

Oh!.. now I understand what your problem is. Hmm… well I can’t change how the Intous behaves with multiple keys pressed, but how about this:

;single hotkey for hiding. Change the key to what you'd like
  h:small_orange_diamond:
  	Send {Ctrl down}
  	Send {Shift down}
  	Send {LButton down}
  	Sleep, 75
  	Send {Shift up}
  
  	KeyWait, h
  	Send {LButton up}
  	Send {Ctrl up}
  return

Do you see what it does? It automates the whole thing and maps it onto one key - My Intous2 does not have any side keys, but it works with the buttons on the pen.

i think i get what it does, but how would you toggle this with hiding green and hiding red? also how does it know when i’ve let go of the shift, i’m guessing the sleep command but is that timed? sorry if i’m making this overly complicated.
Also i’ve written to wacom, have to see what they say, but i’m not to optimisitc.

Hi spaceboy, I don’t have any such issues with my intuos3, and it has the modifiers set up on the tablet keys by default on install. That sounds weird, I would try a reinstall of the tablet software…

ganymedes, I like the idea and will try it out when I get a chance, thanks!

Man, this solves what drove me crazy for years. I only tried it out this minute, and it seems to work fine. Will you marry me? Thankyou so much!

Using my intuos1 the model moves with the speed of light when AutoHotkey is on. What am I missing? What is the sleep value for?

Using hotkeys only works as long as my intuos is in mousemode (which I don’t like to use) Regular penmode makes the model jump and speed like crazy. Any suggestions? Thankyou guys…

Oh man thanks for this work around! I became a member to be able to thank you for this! I downloaded the actual hotkey program for another hotkey related problem on another application a long time ago but it threw me off with its complexity! (too much coding required to get going!) thanks for this programming example, its excellent! from here i can get the keys and mouse presses how i normally navigate in maya (well i should be able to). But right now this will do perfectly! Did it take you a while to come across this program? or did you come across it in another way and then thought that you could apply it to zbrush?

either way I might take another look at this prog for that other app prob i had!

/_|]/_//_
Adam Collier

-removed-

Anyone know how to write a script to make shift change between smooth peaks and smooth valleys? I want shift and alt+shift to work like it did in 3.5. I’d like shift to smooth valley’s, and alt+shift to smooth peaks.

any ideas?