waveterm/docs/docs/keybindings.mdx
2024-12-19 10:41:28 -08:00

86 lines
5.9 KiB
Text

---
sidebar_position: 2
id: "keybindings"
title: "Key Bindings"
---
import { Kbd } from "@site/src/components/kbd.tsx";
import { PlatformProvider, PlatformSelectorButton } from "@site/src/components/platformcontext.tsx";
<PlatformProvider>
Here's the set of default keybindings available in Wave. It is split into sections.
Some keybindings are always active. Others are only active for certain types of blocks.
Note that these are the MacOS keybindings (they use "Cmd"). For Windows and Linux,
replace "Cmd" with "Alt" (note that "Ctrl" is "Ctrl" on both Mac, Windows, and Linux).
## Global Keybindings
<PlatformSelectorButton />
<div style={{ marginBottom: 20 }}></div>
| Key | Function |
| ---------------------------- | --------------------------------------------------------------------------------- |
| <Kbd k="Cmd:t"/> | Open a new tab |
| <Kbd k="Cmd:n"/> | Open a new terminal block (defaults to the same connection and working directory) |
| <Kbd k="Cmd:Shift:n"/> | Open a new window |
| <Kbd k="Cmd:w"/> | Close the current block |
| <Kbd k="Cmd:Shift:w"/> | Close the current tab |
| <Kbd k="Cmd:m"/> | Magnify / Un-Magnify the current block |
| <Kbd k="Cmd:g"/> | Open the "connection" switcher |
| <Kbd k="Cmd:i"/> | Refocus the current block (useful if the block has lost input focus) |
| <Kbd k="Ctrl:Shift"/> | Show block numbers |
| <Kbd k="Ctrl:Shift:1-9"/> | Switch to block number |
| <Kbd k="Ctrl:Shift:Arrows"/> | Move left, right, up, down between blocks |
| <Kbd k="Cmd:1-9"/> | Switch to tab number |
| <Kbd k="Cmd:["/> | Switch tab left |
| <Kbd k="Cmd:]"/> | Switch tab right |
| <Kbd k="Cmd:Ctrl:1-9"/> | Switch to workspace number |
| <Kbd k="Cmd:Shift:r"/> | Refresh the UI |
## File Preview Keybindings
| Key | Function |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------- |
| <Kbd k="[text]"/> | Any regular character (e.g. "a", "b") will filter the file list |
| <Kbd k="Escape"/> | Clears the filter |
| <Kbd k="ArrowUp"/> / <Kbd k="ArrowDown"/> | Change file selection up/down |
| <Kbd k="Enter"/> | Open the currently selected file/directory |
| <Kbd k="Cmd:ArrowUp"/> | Move "up" a directory (parent directory) |
| <Kbd k="Cmd:ArrowLeft"/> | Back, move to the previously selected file/directory |
| <Kbd k="Cmd:ArrowRight"/> | Forward (opposite of back) |
| <Kbd k="Cmd:o"/> | Open a new file (accepts relative paths to the current directory) |
| <Kbd k="Cmd:s"/> | When file editor is open, save file |
| <Kbd k="Cmd:e"/> | For files that can be previewed or edited (markdown, CSVs), switches between preview and edit mode |
| <Kbd k="Cmd:r"/> | When file editor is open, revert changes |
## Web Keybindings
| Key | Function |
| ------------------------- | ------------------------------------------------------------- |
| <Kbd k="Cmd:l"/> | Focus the URL input bar |
| <Kbd k="Escape"/> | When the URL input bar is focused, will focus the web content |
| <Kbd k="Cmd:r"/> | Reload webpage |
| <Kbd k="Cmd:ArrowLeft"/> | Back |
| <Kbd k="Cmd:ArrowRight"/> | Forward |
## WaveAI Keybindings
| Key | Function |
| ---------------- | ------------- |
| <Kbd k="Cmd:l"/> | Clear AI Chat |
## Terminal Keybindings
| Key | Function |
| ----------------------- | -------------- |
| <Kbd k="Ctrl:Shift:c"/> | Copy |
| <Kbd k="Ctrl:Shift:v"/> | Paste |
| <Kbd k="Cmd:k"/> | Clear Terminal |
## Customizeable Systemwide Global Hotkey
Wave allows setting a custom global hotkey to focus your most recent window from anywhere in your computer. For more information on this, see [the config docs](./config#customizable-systemwide-global-hotkey).
</PlatformProvider>