Q100226: Spacebar keyboard shortcut control customization in Nuke Studio/Hiero

Follow


SYMPTOMS

By default in Nuke Studio/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.


CAUSE

This is due to the spacebar keyboard shortcut being hardcoded in Nuke Studio/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 Nuke Studio/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)


RESOLUTION

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:

import hiero.ui
playButton = hiero.ui.findMenuAction('Play/Pause')
playButton.setShortcut("Space")

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. More information about using the menu.py and init.py files can be found in the following article: Q100490: What are the init.py and menu.py startup script files

    We're sorry to hear that

    Please tell us why