Q100226: Spacebar control customization in NukeStudio/Hiero
By default in NukeStudio/Hiero, the spacebar keyboard shortcut is used to maximize the panel rather than to play/pause the Viewer, as is commonly done in other applications.
This is due to the spacebar keyboard shortcut being hardcoded in NukeStudio/Hiero to always maximize the active pane. So while it is possible to set the spacebar to play/pause the Viewer, it will also maximize the panel each time.
We have an open feature request to add a preference into NukeStudio/Hiero to control what the spacebar hotkey does. Please reference this feature as:
- ID 141596 - NukeStudio - Add a preference for what the spacebar controls (Play/Stop vs. Expand pane)
To change the existing behavior of the spacebar keyboard shortcut and set it to play/pause the Viewer, you can run the full code below in the Script Editor:
from PySide import QtGui ### For pre Nuke 11
from PySide2 import QtGui ### For Nuke 11+
playButton = hiero.ui.findMenuAction('Play/Pause')
With the above snippet, the spacebar will now activate the playhead of the Viewer, rather than maximizing the window. To have this functionality consistent in all Nuke sessions you will need to add it to your menu.py or init.py.
- For more information on locating or creating these files, please see Nuke's Online Help.
- Please also review the knowledge base article for more information on these files.
We're sorry to hear thatPlease tell us why