Skip to content

πŸŽ₯ Make videos programmatically with React

Docs: Document configurable Studio shortcuts

JonnyBurger11f270f37cd7
diff --git a/packages/docs/docs/config.mdx b/packages/docs/docs/config.mdx
index d91079e5b6..5c55585e50 100644
--- a/packages/docs/docs/config.mdx
+++ b/packages/docs/docs/config.mdx
@@ -236,7 +236,7 @@ The [command line flag](/docs/cli/studio#--disable-keyboard-shortcuts) `--disabl
## `setKeyboardShortcuts()`<AvailableFrom v="4.0.523" />
-Override keyboard shortcuts for Studio commands. Shortcuts that are omitted keep their default binding. Set a command to `null` to disable its shortcut.
+Override keyboard shortcuts for Studio commands. Shortcuts that are omitted keep their default binding. Set a command to `null` to disable its shortcut. See [Keyboard shortcuts](/docs/studio/shortcuts) for the available action IDs and defaults.
```ts twoslash title="remotion.config.ts"
import {Config} from '@remotion/cli/config';
diff --git a/packages/docs/docs/studio/shortcuts.mdx b/packages/docs/docs/studio/shortcuts.mdx
index b488c366b3..77469aacdb 100644
--- a/packages/docs/docs/studio/shortcuts.mdx
+++ b/packages/docs/docs/studio/shortcuts.mdx
@@ -1,423 +1,91 @@
---
image: /generated/articles-docs-studio-shortcuts.png
-title: Keyboard navigation
+title: Keyboard shortcuts
crumb: 'Remotion Studio'
---
-## Shortcuts
-
-You can always find the list of keyboard shortcuts by pressing <kbd>?</kbd> in the Studio.
-
-### Playback
-
-<table>
-<tr>
-<td>
- <kbd>
- <svg viewBox="0 0 448 512" style={{ width: 10, display: "inline" }}>
- <path
- fill="currentColor"
- d="M48.048 304h73.798v128c0 26.51 21.49 48 48 48h108.308c26.51 0 48-21.49 48-48V304h73.789c42.638 0 64.151-51.731 33.941-81.941l-175.943-176c-18.745-18.745-49.137-18.746-67.882 0l-175.952 176C-16.042 252.208 5.325 304 48.048 304zM224 80l176 176H278.154v176H169.846V256H48L224 80z"
- ></path>
- </svg>
- </kbd>
- <div style={{ width: 2, display: "inline-block" }} />
- <kbd>
- <svg viewBox="0 0 448 512" style={{ width: 10, display: "inline" }}>
- <path
- fill="currentColor"
- d="M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"
- ></path>
- </svg>
- </kbd>{" "}
- </td>
- <td>
- Move 1 second back{" "}
- </td>
- </tr>
- <tr>
- <td>
- <kbd>
- <svg viewBox="0 0 448 512" style={{ width: 10, display: "inline" }}>
- <path
- fill="currentColor"
- d="M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"
- ></path>
- </svg>
- </kbd>{" "}
- </td>
- <td>
-Move 1 frame back
- </td>
- </tr>
-<tr>
-<td>
- <kbd>Space</kbd>
-</td>
-<td>Play / Pause</td>
-
-</tr>
-<tr>
-<td>
- <kbd>
- <svg viewBox="0 0 448 512" style={{ width: 10, display: "inline" }}>
- <path
- fill="currentColor"
- d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
- ></path>
- </svg>
- </kbd>{" "}
-</td>
-<td>
- Move 1 frame forward
-</td>
-</tr>
-<tr>
-<td> <kbd>
- <svg viewBox="0 0 448 512" style={{ width: 10, display: "inline" }}>
- <path
- fill="currentColor"
- d="M48.048 304h73.798v128c0 26.51 21.49 48 48 48h108.308c26.51 0 48-21.49 48-48V304h73.789c42.638 0 64.151-51.731 33.941-81.941l-175.943-176c-18.745-18.745-49.137-18.746-67.882 0l-175.952 176C-16.042 252.208 5.325 304 48.048 304zM224 80l176 176H278.154v176H169.846V256H48L224 80z"
- ></path>
- </svg>
- </kbd>
- <div style={{ width: 2, display: "inline-block" }} />
- <kbd>
- <svg viewBox="0 0 448 512" style={{ width: 10, display: "inline" }}>
- <path
- fill="currentColor"
- d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
- ></path>
- </svg>
- </kbd>
-</td>
-<td>
- Move 1 second forward
-
-</td>
-</tr>
-
-<tr>
-<td>
-<kbd>A</kbd>
-</td>
-<td>
-Jump to beginning
-</td>
-</tr>
-<tr>
-<td>
-<kbd>E</kbd>
-</td>
-<td>
-Jump to end
-</td>
-</tr>
-<tr>
-<td>
-<kbd>J</kbd>
-</td>
-<td>
-Play in reverse
-</td>
-</tr>
-<tr>
-<td>
-<kbd>K</kbd>
-</td>
-<td>
-Pause
-</td>
-</tr>
-<tr>
-<td>
-<kbd>L</kbd>
-</td>
-<td>
-Play (press repeatedly to increase speed)
-</td>
-</tr>
-<tr>
-<td>
-<kbd>G</kbd>
-</td>
-<td>
-Jump to frame
-</td>
-</tr>
-<tr>
-<td>
-<kbd>Enter</kbd>
-</td>
-<td>
-Pause and return to where playback started
-</td>
-</tr>
-</table>
-
-### Sidebars
-
-<table>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>B</kbd>
- </td>
- <td>Toggle left sidebar</td>
- </tr>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>J</kbd>
- </td>
- <td>Toggle right sidebar</td>
- </tr>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>G</kbd>
- </td>
- <td>Toggle both sidebars</td>
- </tr>
-</table>
-
-### View
-
-<table>
- <tr>
- <td>
- <kbd>F</kbd>
- </td>
- <td>Enter fullscreen</td>
- </tr>
- <tr>
- <td>
- <kbd>Esc</kbd>
- </td>
- <td>Exit fullscreen</td>
- </tr>
-</table>
-
-### Playback range
-
-<table>
- <tr>
- <td>
- <kbd>I</kbd>
- </td>
- <td>Set In Point - video will only play from this point</td>
- </tr>
- <tr>
- <td>
- <kbd>O</kbd>
- </td>
- <td>Set Out Point - video will only play until this point</td>
- </tr>
- <tr>
- <td>
- <kbd>X</kbd>
- </td>
- <td>Clear both In and Out points</td>
- </tr>
-</table>
-
-### Zoom
-
-<table>
- <tr>
- <td>
- <kbd>+</kbd>
- </td>
- <td>Zoom in</td>
- </tr>
- <tr>
- <td>
- <kbd>-</kbd>
- </td>
- <td>Zoom out</td>
- </tr>
- <tr>
- <td>
- <kbd>0</kbd>
- </td>
- <td>Reset zoom</td>
- </tr>
-</table>
-
-### Props editor
-
-<table>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>Z</kbd>
- </td>
- <td>Undo</td>
- </tr>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>Y</kbd>
- </td>
- <td>Redo</td>
- </tr>
-</table>
-
-### Interactivity
-
-<table>
- <tr>
- <td>
- <kbd>Shift</kbd>
- </td>
- <td>Select a range of timeline items</td>
- </tr>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- </td>
- <td>Toggle timeline items in the selection</td>
- </tr>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>A</kbd>
- </td>
- <td>Select all sequence rows</td>
- </tr>
- <tr>
- <td>
- <kbd>Shift</kbd>
- </td>
- <td>Axis-lock canvas outline dragging</td>
- </tr>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>D</kbd>
- </td>
- <td>Duplicate selected sequences</td>
- </tr>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>C</kbd>
- </td>
- <td>Copy selected effects or effect prop values</td>
- </tr>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>X</kbd>
- </td>
- <td>Cut selected effects</td>
- </tr>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>V</kbd>
- </td>
- <td>Paste effects or effect prop values</td>
- </tr>
- <tr>
- <td>
- <kbd>Delete</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>Backspace</kbd>
- </td>
- <td>Delete selected keyframes, sequences or effects where supported; otherwise reset selected props or easing segments</td>
- </tr>
-</table>
-
-### Navigation
-
-<table>
- <tr>
- <td>
- <kbd>PageUp</kbd>
- </td>
- <td>Previous composition</td>
- </tr>
- <tr>
- <td>
- <kbd>PageDown</kbd>
- </td>
- <td>Next composition</td>
- </tr>
- <tr>
- <td>
- <kbd>R</kbd>
- </td>
- <td>Render composition, unless a sequence or prop is selected</td>
- </tr>
- <tr>
- <td>
- <kbd>T</kbd>
- </td>
- <td>Toggle checkerboard background, unless a sequence or prop is selected</td>
- </tr>
-</table>
-
-### Selected sequence or prop
-
-<table>
- <tr>
- <td>
- <kbd>P</kbd>
- </td>
- <td>Select the `style.translate` prop</td>
- </tr>
- <tr>
- <td>
- <kbd>T</kbd>
- </td>
- <td>Select the `style.opacity` prop</td>
- </tr>
- <tr>
- <td>
- <kbd>R</kbd>
- </td>
- <td>Select the `style.rotate` prop</td>
- </tr>
- <tr>
- <td>
- <kbd>S</kbd>
- </td>
- <td>Select the `style.scale` prop</td>
- </tr>
-</table>
-
-### AI
-
-<table>
- <tr>
- <td>
- <kbd>⌘/Ctrl</kbd>
- <div style={{width: 2, display: 'inline-block'}} />
- <kbd>I</kbd>
- </td>
- <td>Ask AI</td>
- </tr>
-</table>
+Open the Shortcuts tab in the Studio settings to see the shortcuts for the current project. You can also press <kbd>?</kbd> to open this tab.
+
+## Customizing shortcuts<AvailableFrom v="4.0.523" />
+
+Select a shortcut in the settings and press a new key combination. The Studio writes the override to `remotion.config.ts` using [`Config.setKeyboardShortcuts()`](/docs/config#setkeyboardshortcuts).
+
+You can also edit the configuration file directly:
+
+```ts twoslash title="remotion.config.ts"
+import {Config} from '@remotion/cli/config';
+// ---cut---
+Config.setKeyboardShortcuts({
+ playPause: {key: 'q'},
+ quickSwitcher: {key: 'p', commandOrControl: true},
+ toggleSnapping: {key: 's', shift: true},
+ render: null,
+});
+```
+
+Omitted actions keep their default shortcut. Set an action to `null` to disable it, or pass an array to assign multiple shortcuts.
+
+`commandOrControl` uses Command on macOS and Control on other platforms. The `shift` and `alt` modifiers are also supported.
+
+## Available actions
+
+| Action ID | Default | Action |
+| ------------------------------- | ------------------------------------------ | -------------------------------------------------------------- |
+| `playPause` | `Space` | Play or pause |
+| `jumpToBeginning` | `A` | Jump to the beginning |
+| `jumpToEnd` | `E` | Jump to the end |
+| `reversePlayback` | `J` | Play in reverse |
+| `pausePlayback` | `K` | Pause playback |
+| `playForward` | `L` | Play forward; press repeatedly to increase speed |
+| `goToFrame` | `G` | Open the frame input |
+| `pauseAndReturnToPlaybackStart` | `Enter` | Pause and return to where playback started |
+| `toggleLeftSidebar` | `Cmd/Ctrl+B` | Toggle the left sidebar |
+| `toggleRightSidebar` | `Cmd/Ctrl+J` | Toggle the right sidebar |
+| `toggleBothSidebars` | `Cmd/Ctrl+G` | Toggle both sidebars |
+| `enterFullscreen` | `F` | Enter fullscreen |
+| `toggleSnapping` | `Shift+M` | Enable or disable snapping |
+| `previousComposition` | `PageUp` | Select the previous composition |
+| `nextComposition` | `PageDown` | Select the next composition |
+| `showKeyboardShortcuts` | `?` | Open the Shortcuts settings |
+| `quickSwitcher` | `Cmd/Ctrl+K` | Open the Quick Switcher |
+| `render` | `R` | Open the Render dialog unless a sequence property is selected |
+| `toggleCheckerboard` | `T` | Toggle the checkerboard unless a sequence property is selected |
+| `setInPoint` | `I` | Set the playback In Point |
+| `setOutPoint` | `O` | Set the playback Out Point |
+| `clearInOutPoints` | `X` | Clear the playback In and Out Points |
+| `zoomIn` | `+` | Zoom into the preview |
+| `zoomOut` | `-` | Zoom out of the preview |
+| `resetZoom` | `0` | Reset the preview zoom |
+| `undo` | `Cmd/Ctrl+Z` | Undo the last props edit |
+| `redo` | `Cmd+Shift+Z` on macOS, `Ctrl+Y` otherwise | Redo the last props edit |
+| `selectAllSequenceRows` | `Cmd/Ctrl+A` | Select all sequence rows |
+| `selectTranslateProp` | `P` | Select the `style.translate` property |
+| `selectOpacityProp` | `T` | Select the `style.opacity` property |
+| `selectRotateProp` | `R` | Select the `style.rotate` property |
+| `selectScaleProp` | `S` | Select the `style.scale` property |
+| `duplicateSequences` | `Cmd/Ctrl+D` | Duplicate selected sequences |
+| `copyEffectsAndValues` | `Cmd/Ctrl+C` | Copy selected effects or property values |
+| `cutEffects` | `Cmd/Ctrl+X` | Cut selected effects |
+| `deleteSelection` | `Backspace` or `Delete` | Delete or reset the selection |
+| `askAI` | `Cmd/Ctrl+I` | Open Ask AI when it is enabled |
+
+## Fixed shortcuts
+
+Some shortcuts are context-sensitive interactions or browser events and cannot yet be overridden:
+
+| Shortcut | Action |
+| ---------------------------------------- | -------------------------------------------------------------------- |
+| `Left Arrow` / `Right Arrow` | Move one frame or nudge the selected canvas item |
+| `Shift+Left Arrow` / `Shift+Right Arrow` | Move one second or nudge the selected canvas item by a larger amount |
+| `Shift` | Select a range or lock the axis while dragging |
+| `Cmd/Ctrl` | Toggle items in the selection |
+| `Cmd/Ctrl+V` | Paste effects or property values |
+| `Escape` | Exit fullscreen |
## Keyboard navigation
-The menus are keyboard-navigation friendly. Press <kbd>Tab</kbd> to navigate between the menus and <kbd>Enter</kbd> to select an item.
-
-## Quick Switcher
-
-Press <kbd>⌘/Ctrl</kbd> + <kbd>K</kbd> to open the Quick Switcher. You can use it to quickly navigate to any file in your project.
+Press <kbd>Tab</kbd> to navigate between controls and <kbd>Enter</kbd> to activate the focused control.
-## Disable keyboard shortcuts
+## Disabling keyboard shortcuts
-Start the Studio with [`--disable-keyboard-shortcuts`](/docs/cli/studio#--disable-keyboard-shortcuts) to disable all keyboard shortcuts. Useful if you are embedding it into an iframe.
+Use [`Config.setKeyboardShortcutsEnabled(false)`](/docs/config#setkeyboardshortcutsenabled) or start the Studio with [`--disable-keyboard-shortcuts`](/docs/cli/studio#--disable-keyboard-shortcuts) to disable all shortcuts.
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index f6cc3609e5..d26cee3799 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -7257,7 +7257,7 @@ export const articles = [
},
{
id: 'studio/shortcuts',
- title: 'Keyboard navigation',
+ title: 'Keyboard shortcuts',
relativePath: 'docs/studio/shortcuts.mdx',
compId: 'articles-docs-studio-shortcuts',
crumb: 'Remotion Studio',