On this page |
|
Overview ¶
Note
Starting in 20.0, hotkey bindings are specified as <modifiers> + <unmodified_key>
. The <unmodified_key>
in a binding can be an arbitrary unicode character. UTF-8 encoding is used for keymap and override files. If your .keymap
file is from 19.5 or earlier, you can convert it so it uses <modifiers> + <unmodified_key>
bindings.
Note
Starting in 20.5, Houdini uses a new hotkey resolution and context system. See Transitioning hotkey systems.
-
The left pane shows a tree of contexts.
Each hotkey exists in a context. The same key can be assigned to different actions in different contexts. A hotkey in a higher-level context (for example, the top level “Houdini” context) will be overridden by the same hotkey on a more specific context, for example, the geometry viewer’s Select tool).
Some hotkeys, such as ⌦ Del, are assigned to similar actions in many different contexts.
-
The middle pane shows a list of actions in the currently selected context.
-
The right pane shows a description of the currently selected action and a list of hotkeys assigned to the action.
-
Across the bottom is a keyboard schematic showing what keys are currently assigned in the selected context.
Keyboard schematic ¶
Display |
Description |
---|---|
|
Keys assigned in the selected (current) context are a solid, dark color. |
|
Keys that're available and not assigned in the current context are a solid, light color. |
|
Hotkeys assigned only in a lower (more specific) context have light stripes. You can assign the key to an action in this context, but be aware that when you are in the more specific context the key will be overridden. |
|
Hotkeys assigned in a higher (more general) context have more prominent dark stripes. You can assign the key to an action in this context, but be aware that you will be overriding a more general hotkey in this context. When you view this key’s assignments, it displays any existing assignments from both lower and higher contexts. |
Tip
-
Click the Shift, Ctrl, Command, and/or Alt modifier keys on the virtual keyboard to see assignments with those modifiers.
-
Click a key to see all assignments to that key (plus any modifiers) in all contexts.
Editing hotkeys ¶
To... | Do this |
---|---|
Open the hotkey editor |
In the main menus, choose Edit ▸ Hotkeys. |
Find the hotkey entry for an item in the interface |
|
Find the actions assigned to a key |
|
Assign a hotkey to an action |
|
Assign a hotkey that references a hotkey for another action |
For more information, see Referencing key bindings. |
Remove a hotkey from an action |
|
Resolving conflicts ¶
When you assign a hotkey to an action, if the key is already assigned in a higher (more general) or lower (more specific) context, Houdini will display a warning icon next to the key in the hotkey list.
When you select hotkey, the editor displays a message explaining the potential conflict.
Conflicts are often OK. There are many situations where you don’t care that a key in a specific context overrides the same key in a more general context.
For example, if you're working in a modeling tool and not doing animation, you might assign the K key and not worry that you're overriding the Set Keyframe key.
However, if you want to resolve the conflict by editing the keys, you have several choices:
-
To remove or change the hotkey from the selected action, click the Delete button next to the hotkey.
-
To remove the hotkey from the other action the key is assigned to, click Remove other in the conflict message.
-
To change the hotkey on the other action the key is assigned to, click Edit other to jump to the other action in the editor.
Assign a radial menu to a hotkey ¶
-
In the hotkey editor, filter for
radial
, or browse the tree on the left to select the context containing the radial menu.-
For the 3D viewer, the context is Houdini ▸ Panes ▸ Geometry Viewers.
-
For the network editor, the context is Houdini ▸ Panes ▸ Network Editor.
The context contains actions corresponding to the radial menus defined in the radial menu editor (Edit ▸ Radial Menus).
If you want to create a new radial menu on a key, first create the new menu in the radial menu editor. Then come back to the hotkey editor to assign it to a key.
-
-
In the middle pane, select the radial menu you want to assign a key.
-
In the right pane, double-click the Add row and press the key you want to assign to the radial menu.
-
Click Accept to save the change to the keymap.
Tip
On Windows and Linux, you can open the radial pop-up menu and ⇧ Shift + ⌃ Ctrl + Alt + click the name of a menu to jump to it in the hotkey editor.
Note
The current UI represents a transition between Houdini 16.0, which had radials hardwired to a few keys, and a future version of Houdini that will have a more natural interface for putting menus on keys.
Managing keymaps ¶
-
The keymap is the set of all assigned hotkeys in the application. Houdini ships with a write-protected default keymap in the install directory.
-
If you make any changes to the defaults, the editor stores the modified key map in your preferences directory.
-
You can branch off a new custom keymap using ▸ Save As.
-
To switch to a different key map, click the Keymap dropdown menu in the top-left corner of the hotkey editor and select the map you want to switch to.
-
The default keymap targets a US keyboard layout. Some default bindings don’t work on keyboard layouts that don’t have the required unmodified keys.
Porting 19.5 and earlier custom keymaps to use <modifiers> + <unmodified_key> ¶
You can port a custom keymap from 19.5 or earlier, which used the modified keys for bindings (e.g. !
instead of Shift+1
), to the <modifiers> + <unmodified_key>
equivalent using the following python script.
import keymaputils keymaputils.applyMappingToKeymapFile("/path/to/input.keymap", keymaputils.mappingLegacyShiftedUS, "/path/to/output.keymap")
Porting keymap files to another keyboard layout ¶
A keymap using the <modifiers> + <unmodified_key>
bindings (new since 20.0) can be ported from one keyboard layout to another by a python script.
For example, the following script ports a keymap for a US layout to a French AZERTY layout. The script keeps most letter key bindings the same and ramps the non-letter keys by physical location.
import keymaputils # NB: A mapping to an empty string removes any bindings using that key. mapping = { '`' : '²', '1' : '&', '2' : 'É', '3' : '"', '4' : '\'', '5' : '(', '6' : '-', '7' : 'È', '8' : '_', '9' : 'Ç', '0' : 'À', '-' : ')', '[' : '', ']' : '$', ';' : 'M', '\'': 'Ù', 'M' : ',', ',' : ';', '.' : ':', '/' : '!' } keymaputils.applyMappingToKeymapFile("/path/to/input.keymap2", mapping, "/path/to/output.keymap2")
Transitioning hotkey systems ¶
Starting in 20.5, Houdini uses a new hotkey resolution and context system. In the old system (20.0 and earlier), contexts are categories that contain actions and these actions contain the key bindings. In the new hotkey system:
-
Categories are containers for the action definitions.
-
Contexts are containers for key bindings to the actions.
Hotkey resolution now happens against all the key bindings in a set of active contexts rather than as a consequence of independent comparisons against individual bindings spread out across multiple key event handlers. A key event handler is a generic term for something that processes key events in Houdini, such as a widget or a callback. You can also bind a given action in multiple contexts. For example, a key can trigger a handle action in one viewer state context while a different key triggers that same action in another viewer state context.
Warning
If a key is bound to an action in a context and Houdini’s resolving against that context, the key resolves to that action whether or not you run that action. This can cause issues if you have conflicting hotkeys (see Resolving conflicts).
Houdini 20.5 uses a new set of configuration, keymap, and keymap override file formats. The keymap files use a .keymap2
extension instead of .keymap
. Houdini doesn’t automatically convert .keymap
files from earlier versions into 20.5 .keymap2
files, but you can import your old key bindings from these files with a python script to avoid having to manually recreate them.
Note
It’s not recommended to use a keymap override file to define new hotkeys and contexts because Houdini doesn’t save labels and descriptions to the .keymap2
and .keymap2.overrides
files. Instead, use the configuration files since Houdini loads all copies of the base configuration files in the HOUDINI_UI_PATH
.
Configuration files ¶
In Houdini 20.0 and earlier, you configure defaults in the HOUDINI_UI_PATH’s first houdini/config/Hotkeys/Hotkeys
file, which defines contexts, hotkeys, and key bindings in a line-based format. Keymap override files, which save for a given keymap when you make changes in the Hotkey Manager, are in the same line-based format.
Starting in Houdini 20.5, the following files contain the default hotkey configuration and are in JSON format. These files are in the HOUDINI_UI_PATH and load during startup.
File |
Description |
---|---|
houdini/config/Hotkeys/HotkeyActions.json |
Defines the hotkey categories and actions. The categories are organizational namespaces for the actions. The categories are designated by the Note Contexts and categories often share names (for example, |
houdini/config/Hotkeys/HotkeyContexts.json |
Defines the hotkey contexts, which are the containers for key bindings to actions. |
houdini/config/Hotkeys/HotkeyDefaultBindings.json |
Populates the hotkey contexts with the default key bindings. Most key bindings in a context are to actions from an associated action category or categories. For example, the Contexts can also have bindings to arbitrary actions. For example, you can include a binding to the |
Importing key bindings ¶
Follow these steps to import the key bindings from your 20.0 and earlier .keymap
file into a 20.5 .keymap2
file. If your .keymap
file is from 19.5 or earlier, you’ll first need to convert it to use <modifiers> + <unmodified_key>
bindings. See Porting 19.5 and earlier custom keymaps to use <modifiers> + <unmodified_key> for more details.
Note
If you run into issues importing key bindings, you can either edit the .keymap2
file to add the missing entries or use the keymaputils
python module’s source to write your own function that resolves your specific case.
-
Choose Hotkeys from the Edit menu to open the Hotkey Manager.
-
Choose Export from the Gear menu.
-
Enter a path for the
.keymap2
file you want to generate. This is the base for the new.keymap2
file that you generate through python. -
Click Accept.
-
Note the old
.keymap
file from which you want to import key bindings. -
Run the following scripts in the python shell window.
-
import keymaputils
-
keymaputils.importV1KeymapBindingsToKeymapFile("<path to base keymap2 file>.keymap2”, “<path to old keymap file>.keymap”, "<path to write new keymap2 file with old bindings>.keymap2”, "<label name for keymap2>")
Example
keymaputils.importV1KeymapBindingsToKeymapFile("/houdini/config/base_file.keymap2”, “/houdini/config/old_file.keymap”, "/houdini/config/new_file.keymap2”, "KeymapName")
-
Referencing key bindings ¶
You can create a key binding that references the key binding for an action in a different context. The default Hotkey Manager configuration includes some of these key bindings. To see an example reference, choose Houdini ▸ Panes ▸ Geometry Viewers ▸ Modeling Viewer ▸ Input Selector Triggers in the Hotkey Manager.
References are useful when you want to use a common, high-level key binding (for example, for h.copy
) in a specific setting. References are also useful when you have a subset of key bindings in a context that you want to use in another place. For example, most panes with a network use a subset of the bindings in h.pane.wsheet
for network navigation. Referencing makes it possible to factor these key bindings out into another context that these panes can resolve against without having to resolve against all other bindings from h.pane.wsheet
.
Reverting the system ¶
You can switch back to the Houdini 20.0 and earlier hotkey system by setting the HOUDINI_NEW_HOTKEY_SYSTEM environment variable to 0
before running Houdini. Revert the hotkey system if you run into unforeseen issues with the new system or made extensive use of the old system and require additional time to transition. The ability to revert to the old system will be removed in Houdini 21.0.
Tips ¶
-
Browsing for actions in the context tree is not very useful. It’s easier to find an action using the filter box in the hotkey editor, or by ⌃ Ctrl + Alt + ⇧ Shift + clicking an item in the user interface.
Note
The current legacy organization of contexts is often counter-intuitive. We hope to re-organize the contexts in a future version.
-
To restore the selected action to its factory default hotkeys, click ▸ Reset ▸ Command.
-
To restore all actions in the selected context to their factory default hotkeys, click ▸ Reset ▸ Context.
-
To restore the entire keymap to factory defaults, click ▸ Reset ▸ All.