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.

ShortcutDescription
Ctrl kOmnibox
?Show keyboard shortcuts

Editor

Keyboard shortcuts that control the App editor.

ShortcutDescription
Ctrl BToggle left panel
Ctrl JToggle bottom panel
Ctrl UToggle right panel
Ctrl .Toggle all panels
Ctrl Alt EnterToggle between Preview and Editor mode within the App editor
Ctrl Shift POpen a preview your app as a user would see it
Ctrl SSave
Ctrl ZUndo
Ctrl Shift ZRedo
Ctrl Shift YShow History modal
Ctrl Shift KSearch properties in the right panel

Canvas

Keyboard shortcuts that control the canvas and selected components.

ShortcutDescription
CtrlShow grid
Ctrl Shift GToggle grid
Ctrl /Toggle hidden components
Ctrl + ClickSelect multiple
Ctrl ASelect all
Ctrl + ClickSelect without interacting
Ctrl + DragDrag without interacting
Ctrl CCopy
Ctrl XCut
Ctrl VPaste
Alt + DragDuplicate
↑ → ↓ ←Move
Ctrl ↑ ↓Move 5 rows
Ctrl ↑ → ↓ ←Resize selected component
Ctrl Shift ↑ ↓Move 5 rows
Alt Shift Ctrl RResize to fit
Delete or Ctrl DeleteDelete
EscapeCancel drag or resize, Deselect

Queries and transformers

Keyboard shortcuts that control queries and transformers.

ShortcutDescription
Ctrl EnterPreview
Shift Alt FFormat code
Ctrl SSave
Ctrl DDuplicate

Code editors

Keyboard shortcuts that control code editors.

ShortcutDescription
Ctrl </span>Open pop-out editor
Ctrl spaceShow autocomplete
Ctrl Alt VToggle Vim mode (beta)

Debug Tools

Keyboard shortcuts that control Debug Tools.

ShortcutDescription
Ctrl `Toggle Debug Tools
Ctrl LClear 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.

ModifierKey
shiftShift (PC and Mac)
ctrlCtrl (PC and Mac)
altAlt (PC) or Option (Mac)
modCtrl (PC) or Command (Mac)
commandCommand (Mac only)
superWindows (PC only)
backspaceBackspace (PC and Mac)
spaceSpace (PC and Mac)
escEscape (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.

KeysJavaScriptShortcut
jutils.confetti()j to show confetti.
Jutils.showNotification({title: 'Hello, World!'})Shift j to display a notification.
Ctrl+jutils.copyToClipboard(moment().format('dddd'))Ctrl j to copy the current day to the clipboard.
r eutils.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();