Keyboard shortcuts
Learn more about Retool's built-in keyboard shortcuts and how to create custom shortcuts for your app.
Use Retool's built-in keyboard shortcuts to quickly perform certain actions or control the interface. You can also configure custom keyboard shortcuts on a per-app basis that can trigger queries, interact with components, and more.
Built-in keyboard shortcuts
Retool includes a number of built-in keyboard shortcuts that work across different parts of the interface. Press ? to display a list of available shortcuts at any time. Built-in shortcuts are organized into groups that determine their function.
Global
Keyboard shortcuts that work across Retool interfaces.
Shortcut | Description |
---|---|
Ctrl k | Omnibox |
? | Show keyboard shortcuts |
Editor
Keyboard shortcuts that control the App editor.
Shortcut | Description |
---|---|
Ctrl B | Toggle left panel |
Ctrl J | Toggle bottom panel |
Ctrl U | Toggle right panel |
Ctrl . | Toggle all panels |
Ctrl Alt Enter | Toggle between Preview and Editor mode within the App editor |
Ctrl Shift P | Open a preview your app as a user would see it |
Ctrl S | Save |
Ctrl Z | Undo |
Ctrl Shift Z | Redo |
Ctrl Shift Y | Show History modal |
Ctrl Shift K | Search properties in the right panel |
Canvas
Keyboard shortcuts that control the canvas and selected components.
Shortcut | Description |
---|---|
Ctrl | Show grid |
Ctrl Shift G | Toggle grid |
Ctrl / | Toggle hidden components |
Ctrl + Click | Select multiple |
Ctrl A | Select all |
Ctrl + Click | Select without interacting |
Ctrl + Drag | Drag without interacting |
Ctrl C | Copy |
Ctrl X | Cut |
Ctrl V | Paste |
Alt + Drag | Duplicate |
↑ → ↓ ← | Move |
Ctrl ↑ ↓ | Move 5 rows |
Ctrl ↑ → ↓ ← | Resize selected component |
Ctrl Shift ↑ ↓ | Move 5 rows |
Alt Shift Ctrl R | Resize to fit |
Delete or Ctrl Delete | Delete |
Escape | Cancel drag or resize, Deselect |
Queries and transformers
Keyboard shortcuts that control queries and transformers.
Shortcut | Description |
---|---|
Ctrl Enter | Preview |
Shift Alt F | Format code |
Ctrl S | Save |
Ctrl D | Duplicate |
Code editors
Keyboard shortcuts that control code editors.
Shortcut | Description |
---|---|
Ctrl </span> | Open pop-out editor |
Ctrl space | Show autocomplete |
Ctrl Alt V | Toggle Vim mode (beta) |
Debug Tools
Keyboard shortcuts that control Debug Tools.
Shortcut | Description |
---|---|
Ctrl ` | Toggle Debug Tools |
Ctrl L | Clear console and timeline |
Add custom keyboard shortcuts
You can define custom keyboard shortcuts on a per-app basis. Custom shortcuts can be a single character, combination of keys, or a sequence of key presses. You configure the action to trigger with JavaScript and can use many of the available methods in Retool to control components, queries, and more.
Click •••
in the App editor toolbar to open the App settings menu and select Custom shortcuts.
Define shortcut keys
To add a new shortcut, click + Add new. Specify the shortcut keys to use and the JavaScript to run.
Available shortcut keys
A custom shortcut can include almost any keyboard character or symbol, such as a or $, and optional modifier keys, such as Ctrl.
Shortcuts that use a single uppercase letter or secondary character, such as
A
or@
, automatically require Shift—you don't need to include it in the shortcut.
You can include modifier keys in custom shortcuts. Modifier keys are commonly used for keyboard shortcuts but are not required. Modifiers, named keys, and reserved symbols must be explicitly named when used in a shortcut.
Modifier | Key |
---|---|
shift | Shift (PC and Mac) |
ctrl | Ctrl (PC and Mac) |
alt | Alt (PC) or Option (Mac) |
mod | Ctrl (PC) or Command (Mac) |
command | Command (Mac only) |
super | Windows (PC only) |
backspace | Backspace (PC and Mac) |
space | Space (PC and Mac) |
esc | Escape (PC and Mac) |
plus | + (PC and Mac) |
Certain modifiers automatically change based on the user's platform (e.g., mod
) or you can explicitly define modifiers be the same (e.g., Ctrl
).
Key combination or sequence
You can define a combination or sequence of keys to trigger a shortcut.
- Combination: Separate the keys with
+
(e.g.,alt+5
). You must press the keys simultaneously to trigger the shortcut. Key combinations do not require a modifier key and you could use a combination of character keys. - Sequence: Separate keys with a space (e.g.,
w a s d
). You must press the defined keys in sequential order to trigger the shortcut.
Sequence or combination shortcuts that contain Command or Ctrl will apply anywhere in an app. Other modifier keys such as Shift, Alt, or Option will not trigger inside inputs, as they are needed for special characters and capitalization.
Configure JavaScript actions
You can write JavaScript actions for custom shortcuts that interact with almost every aspect of an app. The following examples trigger actions using Retool's built-in JavaScript utility methods.
Keys | JavaScript | Shortcut |
---|---|---|
j | utils.confetti() | j to show confetti. |
J | utils.showNotification({title: 'Hello, World!'}) | Shift j to display a notification. |
Ctrl+j | utils.copyToClipboard(moment().format('dddd')) | Ctrl j to copy the current day to the clipboard. |
r e | utils.openUrl('https://retool.com', { newTab: 'true', }) | r then e to open retool.com in a new tab. |
You can also use write shortcuts with complex logic to conditionally perform actions or chain together multiple actions. For example, you can define a single shortcut to cycle through all views in a Tabbed Container component.
tabbedContainer1.views.length === tabbedContainer1.currentViewIndex + 1
? tabbedContainer1.setCurrentViewIndex(0)
: tabbedContainer1.showNextVisibleView();
Updated 3 days ago