key-bindings.md

  1# Key bindings
  2
  3Zed can be configured via a simple JSON file located at `~/.config/zed/keymap.json`.
  4
  5## Predefined keymaps
  6
  7We have a growing collection of pre-defined keymaps in [zed repository's keymaps folder](https://github.com/zed-industries/zed/tree/main/assets/keymaps). Our current keymaps include:
  8
  9- Atom
 10- JetBrains
 11- SublimeText
 12- TextMate
 13- VSCode (default)
 14
 15These keymaps can be set via the `base_keymap` setting in your `settings.json` file. Additionally, if you'd like to work from a clean slate, you can provide `"None"` to the setting.
 16
 17## Custom key bindings
 18
 19### Accessing custom key bindings
 20
 21You can open `keymap.json` via `โŒ˜` + `K`, `โŒ˜` + `S`, the command palette, or the `Zed > Settings > Open Key Bindings` application menu item.
 22
 23### Adding a custom key binding
 24
 25To customize key bindings, specify a context and the list of bindings to set. Re-mapping an existing binding will clobber the existing binding in favor of the custom one.
 26
 27An example of adding a set of custom key bindings:
 28
 29```json
 30[
 31  {
 32    "context": "Editor",
 33    "bindings": {
 34      "ctrl-w": "editor::SelectLargerSyntaxNode",
 35      "ctrl-shift-W": "editor::SelectSmallerSyntaxNode",
 36      "ctrl-c": "editor::Cancel"
 37    }
 38  }
 39]
 40```
 41
 42You can see more examples in Zed's [`default.json`](https://github.com/zed-industries/zed/blob/main/assets/keymaps/default-macos.json)
 43
 44_There are some key bindings that can't be overridden; we are working on an issue surrounding this._
 45
 46### Keybinding syntax
 47
 48Zed has the ability to match against not just a single keypress, but a sequence of keys typed in order. Each key in the `"bindings"` map is a sequence of keypresses separated with a space.
 49
 50Each key press is a sequence of modifiers followed by a key. The modifiers are:
 51
 52- `ctrl-` The control key
 53- `cmd-`, `win-` or `super-` for the platform modifier (Command on macOS, Windows key on Windows, and the Super key on Linux).
 54- `alt-` for alt (option on macOS)
 55- `shift-` The shift key
 56- `fn-` The function key
 57
 58The keys can be any single unicode codepoint that your keyboard generates (for example `a`, `0`, `ยฃ` or `รง`), or any named key (`tab`, `f1`, `shift`, or `cmd`).
 59
 60A few examples:
 61
 62```json
 63 "bindings": {
 64   "cmd-k cmd-s": "zed::OpenKeymap", // matches โŒ˜-k then โŒ˜-s
 65   "space e": "editor::Complete", // type space then e
 66   "รง": "editor::Complete", // matches โŒฅ-c
 67   "shift shift": "file_finder::Toggle", // matches pressing and releasing shift twice
 68 }
 69```
 70
 71The `shift-` modifier can only be used in combination with a letter to indicate the uppercase version. For example `shift-g` matches typing `G`. Although on many keyboards shift is used to type punctuation characters like `(`, the keypress is not considered to be modified and so `shift-(` does not match.
 72
 73The `alt-` modifier can be used on many layouts to generate a different key. For example on macOS US keyboard the combination `alt-c` types `รง`. You can match against either in your keymap file, though by convention Zed spells this combination as `alt-c`.
 74
 75It is possible to match against typing a modifier key on its own. For example `shift shift` can be used to implement JetBrains search everywhere shortcut. In this case the binding happens on key release instead of key press.
 76
 77### Contexts
 78
 79Each key binding includes a `context` which determes when the key binding is active. If no context key is present it is considered to be in the `Global` context. The context is a boolean expression that can include the following:
 80
 81- Pane
 82- Workspace
 83- Editor
 84- Menu
 85- Terminal
 86- Assistant
 87- ProjectPanel
 88- ProjectSearch
 89- BufferSearch
 90- Search
 91- Dock
 92- EmptyPane
 93- SharedScreen
 94- VimControl
 95- vim_mode == normal
 96- vim_mode == visual
 97- vim_mode == insert
 98- vim_mode == replace
 99- vim_mode == operator
100- vim_mode == waiting
101
102<!--
103TBD: Improve keybinding contexts documentation https://github.com/zed-industries/zed/issues/14718
104-->
105
106See also: [vim context docs](./vim.md#contexts)
107
108### Remapping keys
109
110A common request is to be able to map from one sequence of keys to another. As of Zed 0.124.0 you can do this with the `workspace::SendKeystrokes` action.
111
112```json
113[
114  {
115    "bindings": {
116      "alt-down": ["workspace::SendKeystrokes", "down down down down"],
117      "cmd-alt-c": [
118        "workspace::SendKeystrokes",
119        "cmd-shift-p copy relative path enter"
120      ],
121      "cmd-alt-r": ["workspace::SendKeystrokes", "cmd-p README enter"]
122    }
123  },
124  {
125    "context": "Editor && vim_mode == insert",
126    "bindings": {
127      "j k": ["workspace::SendKeystrokes", "escape"]
128    }
129  }
130]
131```
132
133There are some limitations to this, notably:
134
135- Any asynchronous operation will not happen until after all your key bindings have been dispatched. For example this means that while you can use a binding to open a file (as in the `cmd-alt-r` example) you cannot send further keystrokes and hope to have them interpreted by the new view.
136- Other examples of asynchronous things are: communicating with a language server, changing the language of a buffer, anything that hits the network.
137- There is a limit of 100 simulated keys at a time, this is to avoid accidental infinite recursion if you trigger SendKeystrokes again inside your bindings.
138
139The argument to `SendKeystrokes` is a space-separated list of keystrokes (using the same syntax as above). Due to the way that keystrokes are parsed, any segment that is not recognized as a keypress will be sent verbatim to the currently focused input field.
140
141### Forward keys to terminal
142
143If you're on Linux or Windows, you might find yourself wanting to forward key combinations to the built-in terminal instead of them being handled by Zed.
144
145For example, `ctrl-n` creates a new tab in Zed on Linux. If you want to send `ctrl-n` to the built-in terminal when it's focused, add the following to your keymap:
146
147```json
148{
149  "context": "Terminal",
150  "bindings": {
151    "ctrl-n": ["terminal::SendKeystroke", "ctrl-n"]
152  }
153}
154```
155
156### Task Key bindings
157
158You can also bind keys to launch Zed Tasks defined in your tasks.json.
159See the [tasks documentation](tasks.md#custom-keybindings-for-tasks) for more.
160
161### All key bindings
162
163#### Global
164
165TBD: Update these to reflect current bindings
166TBD: Add Column with Linux shortcuts
167
168| **Command**               | **Target**   | **Default Shortcut**    |
169| ------------------------- | ------------ | ----------------------- |
170| Toggle focus              | Collab Panel | `โŒ˜ + Shift + C`         |
171| Toggle inlay hints        | Editor       | `Control + :`           |
172| Cancel                    | Menu         | `Control + C`           |
173| Cancel                    | Menu         | `Control + Escape`      |
174| Cancel                    | Menu         | `Escape`                |
175| Cancel                    | Menu         | `โŒ˜ + Escape`            |
176| Confirm                   | Menu         | `Enter`                 |
177| Secondary confirm         | Menu         | `Control + Enter`       |
178| Secondary confirm         | Menu         | `โŒ˜ + Enter`             |
179| Select first              | Menu         | `Page Up`               |
180| Select first              | Menu         | `Shift + Page Down`     |
181| Select first              | Menu         | `Shift + Page Up`       |
182| Select first              | Menu         | `โŒ˜ + Up`                |
183| Select last               | Menu         | `Page Down`             |
184| Select last               | Menu         | `โŒ˜ + Down`              |
185| Select next               | Menu         | `Control + N`           |
186| Select next               | Menu         | `Down`                  |
187| Select prev               | Menu         | `Control + P`           |
188| Select prev               | Menu         | `Up`                    |
189| Confirm input             | Picker       | `Alt + Enter`           |
190| Confirm input             | Picker       | `โŒ˜ + Alt + Enter`       |
191| Use selected query        | Picker       | `Shift + Enter`         |
192| Close window              | Workspace    | `โŒ˜ + Shift + W`         |
193| Follow next collaborator  | Workspace    | `Control + Alt + โŒ˜ + F` |
194| Open                      | Workspace    | `โŒ˜ + O`                 |
195| Toggle zoom               | Workspace    | `Shift + Escape`        |
196| Debug elements            | Zed          | `โŒ˜ + Alt + I`           |
197| Decrease buffer font size | Zed          | `โŒ˜ + -`                 |
198| Hide                      | Zed          | `โŒ˜ + H`                 |
199| Hide others               | Zed          | `Alt + โŒ˜ + H`           |
200| Increase buffer font size | Zed          | `โŒ˜ + +`                 |
201| Increase buffer font size | Zed          | `โŒ˜ + =`                 |
202| Minimize                  | Zed          | `โŒ˜ + M`                 |
203| Open settings             | Zed          | `โŒ˜ + ,`                 |
204| Quit                      | Zed          | `โŒ˜ + Q`                 |
205| Reset buffer font size    | Zed          | `โŒ˜ + 0`                 |
206| Toggle full screen        | Zed          | `Control + โŒ˜ + F`       |
207
208#### Editor
209
210| **Command**                      | **Target** | **Default Shortcut**            |
211| -------------------------------- | ---------- | ------------------------------- |
212| Add selection above              | Editor     | `โŒ˜ + Alt + Up`                  |
213| Add selection above              | Editor     | `โŒ˜ + Control + P`               |
214| Add selection below              | Editor     | `โŒ˜ + Alt + Down`                |
215| Add selection below              | Editor     | `โŒ˜ + Control + N`               |
216| Backspace                        | Editor     | `Backspace`                     |
217| Backspace                        | Editor     | `Control + H`                   |
218| Backspace                        | Editor     | `Shift + Backspace`             |
219| Cancel                           | Editor     | `Escape`                        |
220| Confirm code action              | Editor     | `Enter`                         |
221| Confirm completion               | Editor     | `Enter`                         |
222| Confirm completion               | Editor     | `Tab`                           |
223| Confirm rename                   | Editor     | `Enter`                         |
224| Context menu first               | Editor     | `Page Up`                       |
225| Context menu last                | Editor     | `Page Down`                     |
226| Context menu next                | Editor     | `Control + N`                   |
227| Context menu next                | Editor     | `Down`                          |
228| Context menu prev                | Editor     | `Control + P`                   |
229| Context menu prev                | Editor     | `Up`                            |
230| Copy                             | Editor     | `โŒ˜ + C`                         |
231| Cut                              | Editor     | `โŒ˜ + X`                         |
232| Cut to end of line               | Editor     | `Control + K`                   |
233| Select Next                      | Editor     | `Control + D`                   |
234| Delete                           | Editor     | `Delete`                        |
235| Delete line                      | Editor     | `โŒ˜ + Shift + K`                 |
236| Delete to beginning of line      | Editor     | `โŒ˜ + Backspace`                 |
237| Delete to end of line            | Editor     | `โŒ˜ + Delete`                    |
238| Delete to next subword end       | Editor     | `Control + Alt + D`             |
239| Delete to next subword end       | Editor     | `Control + Alt + Delete`        |
240| Delete to next word end          | Editor     | `Alt + D`                       |
241| Delete to next word end          | Editor     | `Alt + Delete`                  |
242| Delete to previous subword start | Editor     | `Control + Alt + Backspace`     |
243| Delete to previous subword start | Editor     | `Control + Alt + H`             |
244| Delete to previous word start    | Editor     | `Alt + Backspace`               |
245| Delete to previous word start    | Editor     | `Alt + H`                       |
246| Delete to previous word start    | Editor     | `Control + W`                   |
247| Display cursor names             | Editor     | `Control + โŒ˜ + C`               |
248| Duplicate line down              | Editor     | `Alt + Shift + Down`            |
249| Duplicate line up                | Editor     | `Alt + Shift + Up`              |
250| Find all references              | Editor     | `Alt + Shift + F12`             |
251| Fold                             | Editor     | `Alt + โŒ˜ + [`                   |
252| Format                           | Editor     | `โŒ˜ + Shift + I`                 |
253| Go to definition                 | Editor     | `F12`                           |
254| Go to definition split           | Editor     | `Alt + F12`                     |
255| Go to declaration                | Editor     | `Ctrl + F12`                    |
256| Go to declaration split          | Editor     | `Alt + Ctrl + F12`              |
257| Go to diagnostic                 | Editor     | `F8`                            |
258| Go to implementation             | Editor     | `Shift + F12`                   |
259| Go to prev diagnostic            | Editor     | `Shift + F8`                    |
260| Go to type definition            | Editor     | `โŒ˜ + F12`                       |
261| Go to type definition split      | Editor     | `Alt + โŒ˜ + F12`                 |
262| Hover                            | Editor     | `โŒ˜ + K, โŒ˜ + I`                  |
263| Indent                           | Editor     | `โŒ˜ + ]`                         |
264| Join lines                       | Editor     | `Control + J`                   |
265| Move down                        | Editor     | `Control + N`                   |
266| Move down                        | Editor     | `Down`                          |
267| Move left                        | Editor     | `Control + B`                   |
268| Move left                        | Editor     | `Left`                          |
269| Move line down                   | Editor     | `Alt + Down`                    |
270| Move line up                     | Editor     | `Alt + Up`                      |
271| Move page down                   | Editor     | `Control + V`                   |
272| Move page down                   | Editor     | `Shift + Page Down`             |
273| Move page up                     | Editor     | `Alt + V`                       |
274| Move page up                     | Editor     | `Shift + Page Up`               |
275| Move right                       | Editor     | `Control + F`                   |
276| Move right                       | Editor     | `Right`                         |
277| Move to beginning                | Editor     | `โŒ˜ + Up`                        |
278| Move to beginning of line        | Editor     | `Control + A`                   |
279| Move to beginning of line        | Editor     | `Home`                          |
280| Move to beginning of line        | Editor     | `โŒ˜ + Left`                      |
281| Move to enclosing bracket        | Editor     | `Control + M`                   |
282| Move to end                      | Editor     | `โŒ˜ + Down`                      |
283| Move to end of line              | Editor     | `Control + E`                   |
284| Move to end of line              | Editor     | `End`                           |
285| Move to end of line              | Editor     | `โŒ˜ + Right`                     |
286| Move to end of paragraph         | Editor     | `Control + Down`                |
287| Move to next subword end         | Editor     | `Control + Alt + F`             |
288| Move to next subword end         | Editor     | `Control + Alt + Right`         |
289| Move to next word end            | Editor     | `Alt + F`                       |
290| Move to next word end            | Editor     | `Alt + Right`                   |
291| Move to previous subword start   | Editor     | `Control + Alt + B`             |
292| Move to previous subword start   | Editor     | `Control + Alt + Left`          |
293| Move to previous word start      | Editor     | `Alt + B`                       |
294| Move to previous word start      | Editor     | `Alt + Left`                    |
295| Move to start of paragraph       | Editor     | `Control + Up`                  |
296| Move up                          | Editor     | `Control + P`                   |
297| Move up                          | Editor     | `Up`                            |
298| Next screen                      | Editor     | `Control + L`                   |
299| Outdent                          | Editor     | `โŒ˜ + [`                         |
300| Page down                        | Editor     | `Page Down`                     |
301| Page up                          | Editor     | `Page Up`                       |
302| Paste                            | Editor     | `โŒ˜ + V`                         |
303| Redo                             | Editor     | `โŒ˜ + Shift + Z`                 |
304| Redo selection                   | Editor     | `โŒ˜ + Shift + U`                 |
305| Rename                           | Editor     | `F2`                            |
306| Reveal in File Manager           | Editor     | `Alt + โŒ˜ + R`                   |
307| Toggle hunk diff                 | Editor     | `โŒ˜ + '`                         |
308| Expand all hunk diffs            | Editor     | `โŒ˜ + "`                         |
309| Revert selected hunks            | Editor     | `โŒ˜ + Alt + Z`                   |
310| Select all                       | Editor     | `โŒ˜ + A`                         |
311| Select all matches               | Editor     | `โŒ˜ + Shift + L`                 |
312| Select down                      | Editor     | `Control + Shift + N`           |
313| Select down                      | Editor     | `Shift + Down`                  |
314| Select larger syntax node        | Editor     | `Control + Shift + Right`       |
315| Select left                      | Editor     | `Control + Shift + B`           |
316| Select left                      | Editor     | `Shift + Left`                  |
317| Select line                      | Editor     | `โŒ˜ + L`                         |
318| Select next                      | Editor     | `โŒ˜ + D`                         |
319| Select next                      | Editor     | `โŒ˜ + K, โŒ˜ + D`                  |
320| Select previous                  | Editor     | `Control + โŒ˜ + D`               |
321| Select previous                  | Editor     | `โŒ˜ + K, Control + โŒ˜ + D`        |
322| Select right                     | Editor     | `Control + Shift + F`           |
323| Select right                     | Editor     | `Shift + Right`                 |
324| Select smaller syntax node       | Editor     | `Control + Shift + Left`        |
325| Select to beginning              | Editor     | `โŒ˜ + Shift + Up`                |
326| Select to beginning of line      | Editor     | `Control + Shift + A`           |
327| Select to beginning of line      | Editor     | `Shift + Home`                  |
328| Select to beginning of line      | Editor     | `โŒ˜ + Shift + Left`              |
329| Select to end                    | Editor     | `โŒ˜ + Shift + Down`              |
330| Select to end of line            | Editor     | `Control + Shift + E`           |
331| Select to end of line            | Editor     | `Shift + End`                   |
332| Select to end of line            | Editor     | `โŒ˜ + Shift + Right`             |
333| Select to end of paragraph       | Editor     | `Control + Shift + Down`        |
334| Select to next subword end       | Editor     | `Control + Alt + Shift + F`     |
335| Select to next subword end       | Editor     | `Control + Alt + Shift + Right` |
336| Select to next word end          | Editor     | `Alt + Shift + F`               |
337| Select to next word end          | Editor     | `Alt + Shift + Right`           |
338| Select to previous subword start | Editor     | `Control + Alt + Shift + B`     |
339| Select to previous subword start | Editor     | `Control + Alt + Shift + Left`  |
340| Select to previous word start    | Editor     | `Alt + Shift + B`               |
341| Select to previous word start    | Editor     | `Alt + Shift + Left`            |
342| Select to start of paragraph     | Editor     | `Control + Shift + Up`          |
343| Select up                        | Editor     | `Control + Shift + P`           |
344| Select up                        | Editor     | `Shift + Up`                    |
345| Show character palette           | Editor     | `Control + โŒ˜ + Space`           |
346| Show completions                 | Editor     | `Control + Space`               |
347| Show inline completion           | Editor     | `Alt + \`                       |
348| Tab                              | Editor     | `Tab`                           |
349| Tab prev                         | Editor     | `Shift + Tab`                   |
350| Toggle code actions              | Editor     | `โŒ˜ + .`                         |
351| Toggle comments                  | Editor     | `โŒ˜ + /`                         |
352| Toggle git blame                 | Editor     | `โŒ˜ + Alt + G, B`                |
353| Toggle line numbers              | Editor     | `โŒ˜ + ;`                         |
354| Transpose                        | Editor     | `Control + T`                   |
355| Undo                             | Editor     | `โŒ˜ + Z`                         |
356| Undo selection                   | Editor     | `โŒ˜ + U`                         |
357| Unfold lines                     | Editor     | `Alt + โŒ˜ + ]`                   |
358
359#### Editor (Full Only)
360
361| **Command**                      | **Target**    | **Default Shortcut** |
362| -------------------------------- | ------------- | -------------------- |
363| Inline assist                    | Assistant     | `Control + Enter`    |
364| Quote selection                  | Assistant     | `โŒ˜ + >`              |
365| Deploy                           | Buffer Search | `โŒ˜ + Alt + F`        |
366| Deploy                           | Buffer Search | `โŒ˜ + E`              |
367| Deploy                           | Buffer Search | `โŒ˜ + F`              |
368| Accept partial inline completion | Editor        | `Alt + Right`        |
369| Go to hunk                       | Editor        | `โŒ˜ + F8`             |
370| Go to prev hunk                  | Editor        | `โŒ˜ + Shift + F8`     |
371| Newline                          | Editor        | `Enter`              |
372| Newline                          | Editor        | `Shift + Enter`      |
373| Newline above                    | Editor        | `โŒ˜ + Shift + Enter`  |
374| Newline below                    | Editor        | `โŒ˜ + Enter`          |
375| Next inline completion           | Editor        | `Alt + ]`            |
376| Open excerpts                    | Editor        | `Alt + Enter`        |
377| Open excerpts split              | Editor        | `โŒ˜ + K, Enter`       |
378| Previous inline completion       | Editor        | `Alt + [`            |
379| Toggle soft wrap                 | Editor        | `Alt + Z`            |
380| Toggle                           | Go To Line    | `Control + G`        |
381| Toggle                           | Outline       | `โŒ˜ + Shift + O`      |
382
383#### Editor (Auto Height Only)
384
385| **Command**   | **Target** | **Default Shortcut**      |
386| ------------- | ---------- | ------------------------- |
387| Newline       | Editor     | `Control + Enter`         |
388| Newline       | Editor     | `Shift + Enter`           |
389| Newline below | Editor     | `Control + Shift + Enter` |
390
391#### Pane
392
393| **Command**                   | **Target**     | **Default Shortcut**    |
394| ----------------------------- | -------------- | ----------------------- |
395| Activate item 1               | Pane           | `Control + 1`           |
396| Activate item 2               | Pane           | `Control + 2`           |
397| Activate item 3               | Pane           | `Control + 3`           |
398| Activate item 4               | Pane           | `Control + 4`           |
399| Activate item 5               | Pane           | `Control + 5`           |
400| Activate item 6               | Pane           | `Control + 6`           |
401| Activate item 7               | Pane           | `Control + 7`           |
402| Activate item 8               | Pane           | `Control + 8`           |
403| Activate item 9               | Pane           | `Control + 9`           |
404| Activate last item            | Pane           | `Control + 0`           |
405| Activate next item            | Pane           | `Alt + โŒ˜ + Right`       |
406| Activate next item            | Pane           | `โŒ˜ + }`                 |
407| Activate prev item            | Pane           | `Alt + โŒ˜ + Left`        |
408| Activate prev item            | Pane           | `โŒ˜ + {`                 |
409| Close active item             | Pane           | `โŒ˜ + W`                 |
410| Close all items               | Pane           | `โŒ˜ + K, โŒ˜ + W`          |
411| Close clean items             | Pane           | `โŒ˜ + K, U`              |
412| Close inactive items          | Pane           | `Alt + โŒ˜ + T`           |
413| Go back                       | Pane           | `Control + -`           |
414| Go forward                    | Pane           | `Control + _`           |
415| Reopen closed item            | Pane           | `โŒ˜ + Shift + T`         |
416| Split down                    | Pane           | `โŒ˜ + K, Down`           |
417| Split left                    | Pane           | `โŒ˜ + K, Left`           |
418| Split right                   | Pane           | `โŒ˜ + K, Right`          |
419| Split up                      | Pane           | `โŒ˜ + K, Up`             |
420| Toggle filters                | Project Search | `Alt + โŒ˜ + F`           |
421| Toggle focus                  | Project Search | `โŒ˜ + F`                 |
422| Toggle focus                  | Project Search | `โŒ˜ + Shift + F`         |
423| Activate regex mode           | Search         | `Alt + โŒ˜ + G`           |
424| Activate text mode            | Search         | `Alt + โŒ˜ + X`           |
425| Cycle mode                    | Search         | `Alt + Tab`             |
426| Select all matches            | Search         | `Alt + Enter`           |
427| Select next match             | Search         | `โŒ˜ + G`                 |
428| Select prev match             | Search         | `โŒ˜ + Shift + G`         |
429| Toggle case sensitive         | Search         | `Alt + โŒ˜ + C`           |
430| Toggle replace                | Search         | `โŒ˜ + Shift + H`         |
431| Toggle whole word             | Search         | `Alt + โŒ˜ + W`           |
432| Close inactive tabs and panes | Workspace      | `Control + Alt + โŒ˜ + W` |
433
434#### Buffer Search Bar
435
436| **Command**            | **Target**    | **Default Shortcut** |
437| ---------------------- | ------------- | -------------------- |
438| Dismiss                | Buffer Search | `Escape`             |
439| Focus editor           | Buffer Search | `Tab`                |
440| Cycle mode             | Search        | `Alt + Tab`          |
441| Focus search           | Search        | `โŒ˜ + F`              |
442| Next history query     | Search        | `Down`               |
443| Previous history query | Search        | `Up`                 |
444| Replace all            | Search        | `โŒ˜ + Enter`          |
445| Replace next           | Search        | `Enter`              |
446| Select all matches     | Search        | `Alt + Enter`        |
447| Select next match      | Search        | `Enter`              |
448| Select prev match      | Search        | `Shift + Enter`      |
449| Toggle replace         | Search        | `โŒ˜ + Alt + F`        |
450
451#### Workspace
452
453| **Command**                      | **Target**        | **Default Shortcut**    |
454| -------------------------------- | ----------------- | ----------------------- |
455| Toggle focus                     | Assistant         | `โŒ˜ + ?`                 |
456| Open recent                      | Branches          | `Alt + โŒ˜ + B`           |
457| Toggle                           | Command Palette   | `โŒ˜ + Shift + P`         |
458| Deploy                           | Diagnostics       | `โŒ˜ + Shift + M`         |
459| Toggle                           | File Finder       | `โŒ˜ + P`                 |
460| Toggle                           | Language Selector | `โŒ˜ + K, M`              |
461| Deploy search                    | Pane              | `โŒ˜ + Shift + F`         |
462| Deploy search                    | Pane              | `โŒ˜ + Shift + H`         |
463| Toggle focus                     | Project Panel     | `โŒ˜ + Shift + E`         |
464| Toggle                           | Project Symbols   | `โŒ˜ + T`                 |
465| Open recent                      | Projects          | `Alt + โŒ˜ + O`           |
466| Toggle                           | Tab Switcher      | `Control + Shift + Tab` |
467| Toggle                           | Tab Switcher      | `Control + Tab`         |
468| Rerun                            | Task              | `Alt + T`               |
469| Spawn                            | Task              | `Alt + Shift + T`       |
470| Toggle focus                     | Terminal Panel    | ``Control + ` ``        |
471| Toggle                           | Theme Selector    | `โŒ˜ + K, โŒ˜ + T`          |
472| Activate pane 1                  | Workspace         | `โŒ˜ + 1`                 |
473| Activate pane 2                  | Workspace         | `โŒ˜ + 2`                 |
474| Activate pane 3                  | Workspace         | `โŒ˜ + 3`                 |
475| Activate pane 4                  | Workspace         | `โŒ˜ + 4`                 |
476| Activate pane 5                  | Workspace         | `โŒ˜ + 5`                 |
477| Activate pane 6                  | Workspace         | `โŒ˜ + 6`                 |
478| Activate pane 7                  | Workspace         | `โŒ˜ + 7`                 |
479| Activate pane 8                  | Workspace         | `โŒ˜ + 8`                 |
480| Activate pane 9                  | Workspace         | `โŒ˜ + 9`                 |
481| Activate pane in direction down  | Workspace         | `โŒ˜ + K, โŒ˜ + Down`       |
482| Activate pane in direction left  | Workspace         | `โŒ˜ + K, โŒ˜ + Left`       |
483| Activate pane in direction right | Workspace         | `โŒ˜ + K, โŒ˜ + Right`      |
484| Activate pane in direction up    | Workspace         | `โŒ˜ + K, โŒ˜ + Up`         |
485| Close all docks                  | Workspace         | `Alt + โŒ˜ + Y`           |
486| New file                         | Workspace         | `โŒ˜ + N`                 |
487| New terminal                     | Workspace         | `Control + ~`           |
488| New window                       | Workspace         | `โŒ˜ + Shift + N`         |
489| Save                             | Workspace         | `โŒ˜ + S`                 |
490| Save all                         | Workspace         | `โŒ˜ + Alt + S`           |
491| Save as                          | Workspace         | `โŒ˜ + Shift + S`         |
492| Save without format              | Workspace         | `โŒ˜ + K, S`              |
493| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Down`   |
494| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Left`   |
495| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Right`  |
496| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Up`     |
497| Toggle bottom dock               | Workspace         | `โŒ˜ + J`                 |
498| Toggle left dock                 | Workspace         | `โŒ˜ + B`                 |
499| Toggle right dock                | Workspace         | `โŒ˜ + R`                 |
500| Unfollow                         | Workspace         | `Escape`                |
501| Open keymap                      | Zed               | `โŒ˜ + K, โŒ˜ + S`          |
502
503#### Project Panel
504
505| **Command**             | **Target**    | **Default Shortcut**  |
506| ----------------------- | ------------- | --------------------- |
507| Collapse selected entry | Project Panel | `Left`                |
508| Copy                    | Project Panel | `โŒ˜ + C`               |
509| Copy path               | Project Panel | `โŒ˜ + Alt + C`         |
510| Copy relative path      | Project Panel | `Alt + โŒ˜ + Shift + C` |
511| Cut                     | Project Panel | `โŒ˜ + X`               |
512| Delete                  | Project Panel | `Backspace`           |
513| Delete                  | Project Panel | `Delete`              |
514| Delete                  | Project Panel | `โŒ˜ + Backspace`       |
515| Delete                  | Project Panel | `โŒ˜ + Delete`          |
516| Expand selected entry   | Project Panel | `Right`               |
517| New directory           | Project Panel | `Alt + โŒ˜ + N`         |
518| New file                | Project Panel | `โŒ˜ + N`               |
519| New search in directory | Project Panel | `Alt + Shift + F`     |
520| Open                    | Project Panel | `Space`               |
521| Paste                   | Project Panel | `โŒ˜ + V`               |
522| Rename                  | Project Panel | `Enter`               |
523| Rename                  | Project Panel | `F2`                  |
524| Reveal in File Manager  | Project Panel | `Alt + โŒ˜ + R`         |
525
526#### Project Search Bar
527
528| **Command**            | **Target**     | **Default Shortcut** |
529| ---------------------- | -------------- | -------------------- |
530| Search in new          | Project Search | `โŒ˜ + Enter`          |
531| Toggle focus           | Project Search | `Escape`             |
532| Activate regex mode    | Search         | `Alt + โŒ˜ + G`        |
533| Activate text mode     | Search         | `Alt + โŒ˜ + X`        |
534| Cycle mode             | Search         | `Alt + Tab`          |
535| Focus search           | Search         | `โŒ˜ + Shift + F`      |
536| Next history query     | Search         | `Down`               |
537| Previous history query | Search         | `Up`                 |
538| Replace all            | Search         | `โŒ˜ + Enter`          |
539| Replace next           | Search         | `Enter`              |
540| Toggle replace         | Search         | `โŒ˜ + Shift + H`      |
541
542#### Terminal
543
544| **Command**                 | **Target** | **Default Shortcut**  |
545| --------------------------- | ---------- | --------------------- |
546| Clear                       | Terminal   | `โŒ˜ + K`               |
547| Copy                        | Terminal   | `โŒ˜ + C`               |
548| Delete line                 | Terminal   | `โŒ˜ + Backspace`       |
549| Move to beginning of line   | Terminal   | `โŒ˜ + Left`            |
550| Move to end of line         | Terminal   | `โŒ˜ + Right`           |
551| Move to next word end       | Terminal   | `Alt + Right`         |
552| Move to previous word start | Terminal   | `Alt + Left`          |
553| Paste                       | Terminal   | `โŒ˜ + V`               |
554| Show character palette      | Terminal   | `Control + โŒ˜ + Space` |
555
556#### Assistant Editor
557
558| **Command**        | **Target** | **Default Shortcut** |
559| ------------------ | ---------- | -------------------- |
560| Assist             | Assistant  | `โŒ˜ + Enter`          |
561| Cycle message role | Assistant  | `Control + R`        |
562| Quote selection    | Assistant  | `โŒ˜ + >`              |
563| Split              | Assistant  | `Shift + Enter`      |
564| Save               | Workspace  | `โŒ˜ + S`              |