UI Toolbox logoUI Toolbox
Support

Keyboard shortcuts

The workspace runs a WindowCommand for each shortcut. workspace.RunCommand(command) runs the same commands from code.

Command Default keys Action
NextWindow Ctrl+Tab, Ctrl+F6 Focus the next window in screen order: left to right, then top to bottom. Repeat to visit every window.
PreviousWindow Ctrl+Shift+Tab, Ctrl+Shift+F6 Focus the previous window in screen order.
CloseWindow Ctrl+W, Ctrl+F4 Close the focused window, or the selected tab in a group. The group title bar close button still closes the whole group.
NextTab, PreviousTab Ctrl+PageDown, Ctrl+PageUp Select the next or previous local tab. Outside a tab control, cycle windows.
ToggleMinimize Ctrl+M Minimize the focused window, or restore it.
ToggleMaximize F11 Maximize the focused window, or restore it.
ToggleToolbarFocus F10 Move keyboard focus to the first control of the WorkspaceToolbar, or from the toolbar back to the focused window. Works also while nothing has focus.
MoveLeft, MoveRight, MoveUp, MoveDown Ctrl+Arrows Move the focused window by key-step pixels. It stays in the viewport.
ResizeNarrower, ResizeWider, ResizeShorter, ResizeTaller Ctrl+Shift+Arrows Move the right or bottom edge by key-step pixels, within the minimum size of the window (min-width, min-height) and the viewport.
WindowMode Ctrl+Alt+Space Start the window mode on the focused window. See Window mode.
Overview Ctrl held after Ctrl+Tab Show every window in a grid to pick one. See Overview.

Move and resize obey CanBeDragged and CanResize. They do nothing on a minimized, maximized or docked window. NextWindow and PreviousWindow skip a hidden window (see Minimize modes).

With the Input System package

When the com.unity.inputsystem package is installed and the active input handler includes it, the shortcuts are Input System actions:

Players can rebind with the standard Input System APIs on workspace.ActiveInputActionMap:

var action =
    workspace.ActiveInputActionMap!.FindAction(
        nameof(WindowCommand.CloseWindow));
action.Disable();
action.PerformInteractiveRebinding(bindingIndex)
    .OnComplete(op => { op.Dispose(); action.Enable(); }).Start();

// Save and load the player's keys.
PlayerPrefs.SetString("tb-keys",
    workspace.ActiveInputActionMap.asset.SaveBindingOverridesAsJson());
workspace.ActiveInputActionMap.asset.LoadBindingOverridesFromJson(
    PlayerPrefs.GetString("tb-keys"));

ActiveInputActionMap is null until the workspace attaches to a runtime panel, and when the asset has no UIToolbox map. With no UIToolbox map, the workspace logs a warning and uses the fixed keys.

Gamepad

The default asset also has gamepad bindings. The scheme is the same in every screen, so a player learns it once:

Command Gamepad
NextWindow, PreviousWindow Right shoulder (RB), left shoulder (LB)
Overview RB or LB held
NextTab, PreviousTab Right trigger (RT), left trigger (LT)
ToggleToolbarFocus View (select), a tap
WindowMode View (select), held
CloseWindow East (B), see below
ToggleMinimize Right stick press
ToggleMaximize North button
Scroll the focused window Right stick

A cursor for mouse screens

A screen made for the mouse, such as a desktop or a node graph, can add a VirtualCursor. The left stick then moves an arrow that the panel sees as a mouse, A clicks, X clicks with the right button and B raises Cancelled. While the arrow shows, the right stick scrolls the scroll area under it, not the one around the focus, and A and B do not also submit or cancel the focused control. The d-pad still moves the focus, and the shoulder, trigger and View commands above work as before. The arrow hides when the mouse moves.

Shoulder marks

Set bumper-marks="true" (BumperMarks) to show an LB glyph on the title bar of the previous window and an RB glyph on the next one. The marks show only while the player uses a gamepad. Each mark is a GamepadGlyph with the class tb-workspace__bumper-mark (Workspace.BUMPER_MARK_CLASS).

<UIToolbox.Workspace bumper-marks="true" />

The marks are off by default. A game has its own button hints, and two more glyphs on its windows would repeat them. The demo scenes turn them on, because a demo is where a player learns the buttons.

Overview

workspace.ShowOverview() shows every open window in a grid to pick one, as the task view of a desktop does. RB or LB held for 0.3 seconds opens it, and so does Ctrl held after Ctrl+Tab.

Set overview="false" (OverviewEnabled) to turn it off. The window keys then only switch the windows.

<UIToolbox.Workspace overview="false" />

While it shows, IsOverviewOpen is true and the workspace has the class tb-workspace--overview (Workspace.OVERVIEW_CLASS).

Window mode

workspace.ShowWindowMode() moves and resizes one window with the gamepad or the keys, as a console desktop does. View held or Ctrl+Alt+Space starts it on the focused window.

Gamepad Keys Action
D-pad Tab Pick another window.
Left stick Arrows Move the window.
Right stick, LT, RT Shift+Arrows Resize the window.
A Enter Keep the new bounds and end the mode.
B Escape Put the windows back and end the mode.

Set window-mode="false" (WindowModeEnabled) to turn it off. While it is on, IsInWindowMode is true, the workspace has the class tb-workspace--window-mode (Workspace.WINDOW_MODE_CLASS) and the window has tb-window--mode-target (Workspace.WINDOW_MODE_TARGET_CLASS).

Focus and the focus ring

Action hints

Use PromptBar with explicit hints for the actions a screen supports. Use Navigate for focus movement and Select for native control activation. The focused button names the action, such as Scan or Restart challenge. Only show Cancel when the focused interaction supports cancellation. GamepadGlyph displays the current device family instead of Xbox-specific text.

Window cycling skips hidden and disabled controls. Closing a focused window, changing its active tab, or restoring a layout recovers focus inside an available window. A newer user focus takes priority over scheduled recovery.

Without the Input System package

The workspace reads the default keys from UI Toolkit KeyDownEvent. These keys are fixed. On macOS, Cmd replaces Ctrl.

Rules for both

Scrolling and selection

The right stick scrolls the nearest ScrollView containing keyboard focus. It works when a child button, field, or list has focus. Push down to scroll down and right to scroll right. At the edge of an inner view, its parent takes the remaining movement. Scrolling works while gameplay is paused.

The right stick never moves a window. With no scroll area around the focused control, it scrolls the focused window. In the window mode the right stick resizes the window. A held inventory item keeps its rotation input. A binding field that listens for input keeps that input. A modal scrolls its own content, not the background.

Keyboard, D-pad, and left-stick focus changes reveal the focused control inside its enclosing scroll areas. A shaped inventory also reveals its selected cell when navigation changes the selection within the grid. Manual right-stick scrolling does not change selection or snap back to it. The next focus change reveals the newly focused control.

This behavior applies to runtime panels registered by Toolbox controls, workspaces, popups, and the UIDocuments present when a scene loads. Editor panels retain Unity's editor behavior. Right-stick scrolling needs the Input System package; focus visibility also works without that package.