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



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.


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)


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
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.

    We're sorry to hear that

    Please tell us why