PDA

View Full Version : Which hotkeys are available for Zscripts?



havran
05-07-03, 08:59 AM
Which hotkeys are available for Zscripts?

Is it just the alphanumeric keys plus the Ctrl, Alt and Shift modifiers, or can other things like F1-F12 and the arrow keys be used?

(and if arrow keys can be used, how do you refer to them in the script?)

Also, what happens if there is a conflict with a built-in shortcut, for instance if a Zscript hotkey is enabled because a certain condition is true -- would it override the built-in shortcut at that moment, or be ignored in any case?

Thanks for any info or tips in this area :)

davey
05-07-03, 11:10 AM
Hi, havran ...

In the Preferences : Utilities sub-palette, the second slider (beneath Timing Info) shows you the internal number of the last key pressed.

You can use this number in place of your ZScripted IButton hotkey.

For instance, on my keyboard, there's a "help" key; when I press it, this slider displays the number 5.

I can use this number in my ZScript to perform a task when I press the "help" key...




If there is a conflict with a built-in hotkey, your ZScript overrides it. For instance, you could write a ZScript which does something cool when you press the 'C' key. Normally, the 'C' key in ZBrush picks the color currently beneath the cursor; if you ZScript is loaded, that doesn't happen, but your ZScript action does.

Hope that helps,
dave

havran
05-07-03, 11:14 AM
Thanks, Dave! :)