ZBrushCentral

Hotkeys with ALT key for scripted buttons work only once.

I’ve written ZPlugin that lets user assign brushes to slots and switch between them with hotkeys. Everything in my script works perfectly fine if I click scripted buttons with mouse. Problem is with hotkeys that works different than other parts of Zbrush.

I have button “1” that use hotkey G and button “2” that use ALT+G. When I press ALT+G once button “2” is pressed as intended. However when I still hold ALT key down an press G again button 1 is pressed instead of 2. Turns out information of pressed modifier keys is lost after script execute. I’ve read whole documentation, command reference, searched forums and find nothing about this strange behavior. Is that bug in Zbrush input system?

This plugin took me multiple work days and this ridiculous issue renders it worthless. :confused: Any ideas how to solve it?

You can’t hold down the Alt key and just press the other key. But the hotkey will work if you lift the Alt key between keypresses.