Python Editor keyboard shortcuts

The following table lists the Python Editor keyboard shortcuts.
Note: Keyboard shortcuts available via the Python Editor override the MotionBuilder keyboard shortcuts when the Python Editor is in active state.
Keyboard Shortcut Command Description

Ctrl+T

Create work area.

Creates a tab in the work area of the Python Editor for the new script.

Ctrl+O

Load script.

Loads the selected script in the Python Editor work area.

Ctrl+-

Close script.

Closes the active script in the Python Editor work area.

Ctrl+S

Save active script.

Saves the active script.

Ctrl+F2

Save new active script.

Saves the new active script.

F5

Execute active script.

Executes code or a script, depending on whether a code is highlighted. If nothing is highlighted, it executes the active script in the Python Editor work area.

Ctrl+=

Add active script to scene.

Adds the active script to the scene. See the scene browser Scripts directory.

F10

Display Python Tool Manager.

Displays the Python Tool Manager.

F1

Trigger Python Editor context help.

Displays help related to current action.

Ctrl+F

Find code.

Finds the term specified in the interactive console’s text field.

Note: The search area is defined by the Search button toggle option (, , or ).

F3

Find subsequent code.

Finds the next instance of the term specified in the interactive console’s text field. Note: You need to first do a search (Ctrl+F).

Ctrl+H

Find and replace code.

Displays the Search and Replace dialog where you can either choose to find or find and replace text in the active script.

Ctrl+G

Go to line.

Activates the interactive console text field where you enter the line number you want to go to in the active script.

Alt+N

Go to next command.

In the interactive console, traverses history by entering the first command.

Alt+P

Go to previous command.

In the interactive console, traverses history by entering the previous command.

Tab

Indent text block.

Indents code block to be entered in the active script.

Alt+C

Comment selected code.

Comments selected code in the active script.

Alt+U

Uncomment selected code.

Uncomments selected code in the active script.

Ctrl+Space

Auto-complete entry.

Auto-completes the instantiated class.

MotionBuilder includes global keyboard shortcuts and Python Editor keyboard shortcuts. The global keyboard shortcuts are available anywhere from within MotionBuilder.

You can customize 13 Python Editor keyboard shortcuts so they call the Python code. The Python Editor keyboard mappings are listed in the PythonKeyboard.txt file located in the following default directories:
  • C:\Program Files\Autodesk\MotionBuilder Danko (64-bit)\bin\config\Python\Keyboard
  • C:\Program Files (x86)\Autodesk\MotionBuilder Danko (32-bit)\bin\config\Python\Keyboard
You can bind a keyboard shortcut to the execution of a script by modifying configuration files. A graphical editor for this file is provided with the KeyboardMapper.py script. The KeyboardMapper.py script is located in the following default directories:
  • C:\Program Files\Autodesk\MotionBuilder Danko (64-bit)\bin\config\Scripts\ComplexTools
  • C:\Program Files (x86)\Autodesk\MotionBuilder Danko (32-bit)\bin\config\Scripts\ComplexTools
Attention: A script needs to be bound to a keyboard shortcut that is not used. If it isn’t, MotionBuilder gives a warning message.