ZBrushCentral

does anybody know how to set a hotkey for a mouse button?

hey there :slight_smile:
I am familiar with how to set a keyboard hotkey using the [ISetHotKey] command in reference to the keyboard, but how might someone make reference to a mouse button? for instance, how might i create a hotkey using the ‘alt’ + ‘left mouse button’ to trigger say an object tumble?

any help would be greatly appreciated :slight_smile:

Although you could probably combine an ‘Alt’ keypress and a left mouse-click for some operations, broadly speaking you will find what you are trying very difficult if not impossible. You can get the current state of the mouse left button by using [MouseLButton] but there’s no equivalent to the [ISetHotkey command for mouse+keypress actions. Additionally holding down the hotkey for a button is handled in zscripts as the same as repeated pressing of the key which can cause problems. If you are keen to see what’s possible then I suggest you look at the [Sleep command. It has its quirks but can be very useful.

cheers marcus :slight_smile:
This does sound promising but I’m a little unclear on how one might go about structure/syntax/etc. It wouldn’t be too much to ask for an example of how this may be used by some chance?

Check out the ‘code samples’ sticky threads in this forum. There are examples of the sleep command there.

thanks mate, i’ll give him a look :slight_smile: