Improved Shortcut Support settings
Customize the settings that decide which action responds when several actions share a control, such as a B key action and a Shift+B composite action.
To use these settings, go to Edit > Project Settings > Input System Package, and refer to the Improved Shortcut Support section.
Note
Use Priority Consumption for new projects. Complexity Consumption exists for compatibility with projects made with earlier versions of the Input System, and its results can be hard to predict.
Improved Shortcut Support settings reference
The Improved Shortcut Support section contains the following settings.
| Setting | Description |
|---|---|
| Complexity Consumption | Resolves overlapping bindings by complexity, which is the number of parts in a composite binding. The Input System checks more complex bindings first. The first action that performs consumes the input, so simpler bindings on the same control don't respond. Composites with modifiers require the user to press the modifiers before the other button, unless the binding's Modifiers Order is Unordered. Off by default. To set this in code, use InputSettings.shortcutKeysConsumeInput.This setting has no effect if you enable Priority Consumption. |
| Priority Consumption | Resolves overlapping bindings by each action's Priority value. The Input System notifies higher-priority actions first. When an action with a priority greater than 0 performs, it consumes the input, so lower-priority actions on the same control don't respond to that input event. An action consumes input only when it performs, not when it starts. For example, a Hold action doesn't stop lower-priority actions from responding to the initial press. An action with priority 0 doesn't consume input. If you enable this setting, the Input Actions Editor shows the Priority field for each action. The asset keeps saved priority values even when you disable the setting. Off by default.To set this in code, use InputSettings.shortcutKeysUseActionPriority. |
Choose which action responds with Priority Consumption
Use Priority Consumption to decide which action responds to a shared control, instead of relying on how many parts each binding has. Complexity Consumption decides automatically, so it's harder to predict. For example, when two composites have the same number of parts, the order in which the Input System checks them isn't defined.
For example, to make a Shift+B action block a B action:
- Enable Priority Consumption.
- In the Input Actions Editor, select the Shift+B action and set Priority to a value greater than
0, such as10. - Leave the Priority of the B action at
0.
When the user presses Shift+B, the Shift+B action performs first and consumes the B press, so the B action doesn't respond. When the user presses B on its own, the Shift+B action doesn't perform, so the B action responds as usual.
For more information about the Priority property, refer to Overlapping bindings and action priority.