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### Disabling a key binding
 47
 48Use `null` value to disable a key binding:
 49
 50```json
 51[
 52  {
 53    "context": "Editor",
 54    "bindings": {
 55      "alt-\\": null
 56    }
 57  }
 58]
 59```
 60
 61### Keybinding syntax
 62
 63Zed 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.
 64
 65Each key press is a sequence of modifiers followed by a key. The modifiers are:
 66
 67- `ctrl-` The control key
 68- `cmd-`, `win-` or `super-` for the platform modifier (Command on macOS, Windows key on Windows, and the Super key on Linux).
 69- `alt-` for alt (option on macOS)
 70- `shift-` The shift key
 71- `fn-` The function key
 72
 73The 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`).
 74
 75A few examples:
 76
 77```json
 78 "bindings": {
 79   "cmd-k cmd-s": "zed::OpenKeymap", // matches โŒ˜-k then โŒ˜-s
 80   "space e": "editor::Complete", // type space then e
 81   "รง": "editor::Complete", // matches โŒฅ-c
 82   "shift shift": "file_finder::Toggle", // matches pressing and releasing shift twice
 83 }
 84```
 85
 86The `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.
 87
 88The `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`.
 89
 90It 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.
 91
 92### Contexts
 93
 94Each 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:
 95
 96- Pane
 97- Workspace
 98- Editor
 99- Menu
100- Terminal
101- Assistant
102- ProjectPanel
103- ProjectSearch
104- BufferSearch
105- Search
106- Dock
107- EmptyPane
108- SharedScreen
109- VimControl
110- vim_mode == normal
111- vim_mode == visual
112- vim_mode == insert
113- vim_mode == replace
114- vim_mode == operator
115- vim_mode == waiting
116
117<!--
118TBD: Improve keybinding contexts documentation https://github.com/zed-industries/zed/issues/14718
119-->
120
121See also: [vim context docs](./vim.md#contexts)
122
123### Remapping keys
124
125A 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.
126
127```json
128[
129  {
130    "bindings": {
131      "alt-down": ["workspace::SendKeystrokes", "down down down down"],
132      "cmd-alt-c": [
133        "workspace::SendKeystrokes",
134        "cmd-shift-p copy relative path enter"
135      ],
136      "cmd-alt-r": ["workspace::SendKeystrokes", "cmd-p README enter"]
137    }
138  },
139  {
140    "context": "Editor && vim_mode == insert",
141    "bindings": {
142      "j k": ["workspace::SendKeystrokes", "escape"]
143    }
144  }
145]
146```
147
148There are some limitations to this, notably:
149
150- 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.
151- Other examples of asynchronous things are: communicating with a language server, changing the language of a buffer, anything that hits the network.
152- 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.
153
154The 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.
155
156### Forward keys to terminal
157
158If 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.
159
160For 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:
161
162```json
163{
164  "context": "Terminal",
165  "bindings": {
166    "ctrl-n": ["terminal::SendKeystroke", "ctrl-n"]
167  }
168}
169```
170
171### Task Key bindings
172
173You can also bind keys to launch Zed Tasks defined in your tasks.json.
174See the [tasks documentation](tasks.md#custom-keybindings-for-tasks) for more.
175
176### All key bindings
177
178#### Global
179
180TBD: Update these to reflect current bindings
181TBD: Add Column with Linux shortcuts
182
183| **Command**               | **Target**   | **Default Shortcut**    |
184| ------------------------- | ------------ | ----------------------- |
185| Toggle focus              | Collab Panel | `โŒ˜ + Shift + C`         |
186| Toggle inlay hints        | Editor       | `Control + :`           |
187| Cancel                    | Menu         | `Control + C`           |
188| Cancel                    | Menu         | `Control + Escape`      |
189| Cancel                    | Menu         | `Escape`                |
190| Cancel                    | Menu         | `โŒ˜ + Escape`            |
191| Confirm                   | Menu         | `Enter`                 |
192| Secondary confirm         | Menu         | `Control + Enter`       |
193| Secondary confirm         | Menu         | `โŒ˜ + Enter`             |
194| Select first              | Menu         | `Page Up`               |
195| Select first              | Menu         | `Shift + Page Down`     |
196| Select first              | Menu         | `Shift + Page Up`       |
197| Select first              | Menu         | `โŒ˜ + Up`                |
198| Select last               | Menu         | `Page Down`             |
199| Select last               | Menu         | `โŒ˜ + Down`              |
200| Select next               | Menu         | `Control + N`           |
201| Select next               | Menu         | `Down`                  |
202| Select prev               | Menu         | `Control + P`           |
203| Select prev               | Menu         | `Up`                    |
204| Confirm input             | Picker       | `Alt + Enter`           |
205| Confirm input             | Picker       | `โŒ˜ + Alt + Enter`       |
206| Use selected query        | Picker       | `Shift + Enter`         |
207| Close window              | Workspace    | `โŒ˜ + Shift + W`         |
208| Follow next collaborator  | Workspace    | `Control + Alt + โŒ˜ + F` |
209| Open                      | Workspace    | `โŒ˜ + O`                 |
210| Toggle zoom               | Workspace    | `Shift + Escape`        |
211| Debug elements            | Zed          | `โŒ˜ + Alt + I`           |
212| Decrease buffer font size | Zed          | `โŒ˜ + -`                 |
213| Hide                      | Zed          | `โŒ˜ + H`                 |
214| Hide others               | Zed          | `Alt + โŒ˜ + H`           |
215| Increase buffer font size | Zed          | `โŒ˜ + +`                 |
216| Increase buffer font size | Zed          | `โŒ˜ + =`                 |
217| Minimize                  | Zed          | `โŒ˜ + M`                 |
218| Open settings             | Zed          | `โŒ˜ + ,`                 |
219| Quit                      | Zed          | `โŒ˜ + Q`                 |
220| Reset buffer font size    | Zed          | `โŒ˜ + 0`                 |
221| Toggle full screen        | Zed          | `Control + โŒ˜ + F`       |
222
223#### Editor
224
225| **Command**                      | **Target** | **Default Shortcut**            |
226| -------------------------------- | ---------- | ------------------------------- |
227| Add selection above              | Editor     | `โŒ˜ + Alt + Up`                  |
228| Add selection above              | Editor     | `โŒ˜ + Control + P`               |
229| Add selection below              | Editor     | `โŒ˜ + Alt + Down`                |
230| Add selection below              | Editor     | `โŒ˜ + Control + N`               |
231| Backspace                        | Editor     | `Backspace`                     |
232| Backspace                        | Editor     | `Control + H`                   |
233| Backspace                        | Editor     | `Shift + Backspace`             |
234| Cancel                           | Editor     | `Escape`                        |
235| Confirm code action              | Editor     | `Enter`                         |
236| Confirm completion               | Editor     | `Enter`                         |
237| Confirm completion               | Editor     | `Tab`                           |
238| Confirm rename                   | Editor     | `Enter`                         |
239| Context menu first               | Editor     | `Page Up`                       |
240| Context menu last                | Editor     | `Page Down`                     |
241| Context menu next                | Editor     | `Control + N`                   |
242| Context menu next                | Editor     | `Down`                          |
243| Context menu prev                | Editor     | `Control + P`                   |
244| Context menu prev                | Editor     | `Up`                            |
245| Copy                             | Editor     | `โŒ˜ + C`                         |
246| Cut                              | Editor     | `โŒ˜ + X`                         |
247| Cut to end of line               | Editor     | `Control + K`                   |
248| Select Next                      | Editor     | `Control + D`                   |
249| Delete                           | Editor     | `Delete`                        |
250| Delete line                      | Editor     | `โŒ˜ + Shift + K`                 |
251| Delete to beginning of line      | Editor     | `โŒ˜ + Backspace`                 |
252| Delete to end of line            | Editor     | `โŒ˜ + Delete`                    |
253| Delete to next subword end       | Editor     | `Control + Alt + D`             |
254| Delete to next subword end       | Editor     | `Control + Alt + Delete`        |
255| Delete to next word end          | Editor     | `Alt + D`                       |
256| Delete to next word end          | Editor     | `Alt + Delete`                  |
257| Delete to previous subword start | Editor     | `Control + Alt + Backspace`     |
258| Delete to previous subword start | Editor     | `Control + Alt + H`             |
259| Delete to previous word start    | Editor     | `Alt + Backspace`               |
260| Delete to previous word start    | Editor     | `Alt + H`                       |
261| Delete to previous word start    | Editor     | `Control + W`                   |
262| Display cursor names             | Editor     | `Control + โŒ˜ + C`               |
263| Duplicate line down              | Editor     | `Alt + Shift + Down`            |
264| Duplicate line up                | Editor     | `Alt + Shift + Up`              |
265| Find all references              | Editor     | `Alt + Shift + F12`             |
266| Fold                             | Editor     | `Alt + โŒ˜ + [`                   |
267| Format                           | Editor     | `โŒ˜ + Shift + I`                 |
268| Go to definition                 | Editor     | `F12`                           |
269| Go to definition split           | Editor     | `Alt + F12`                     |
270| Go to declaration                | Editor     | `Ctrl + F12`                    |
271| Go to declaration split          | Editor     | `Alt + Ctrl + F12`              |
272| Go to diagnostic                 | Editor     | `F8`                            |
273| Go to implementation             | Editor     | `Shift + F12`                   |
274| Go to prev diagnostic            | Editor     | `Shift + F8`                    |
275| Go to type definition            | Editor     | `โŒ˜ + F12`                       |
276| Go to type definition split      | Editor     | `Alt + โŒ˜ + F12`                 |
277| Hover                            | Editor     | `โŒ˜ + K, โŒ˜ + I`                  |
278| Indent                           | Editor     | `โŒ˜ + ]`                         |
279| Join lines                       | Editor     | `Control + J`                   |
280| Move down                        | Editor     | `Control + N`                   |
281| Move down                        | Editor     | `Down`                          |
282| Move left                        | Editor     | `Control + B`                   |
283| Move left                        | Editor     | `Left`                          |
284| Move line down                   | Editor     | `Alt + Down`                    |
285| Move line up                     | Editor     | `Alt + Up`                      |
286| Move page down                   | Editor     | `Control + V`                   |
287| Move page down                   | Editor     | `Shift + Page Down`             |
288| Move page up                     | Editor     | `Alt + V`                       |
289| Move page up                     | Editor     | `Shift + Page Up`               |
290| Move right                       | Editor     | `Control + F`                   |
291| Move right                       | Editor     | `Right`                         |
292| Move to beginning                | Editor     | `โŒ˜ + Up`                        |
293| Move to beginning of line        | Editor     | `Control + A`                   |
294| Move to beginning of line        | Editor     | `Home`                          |
295| Move to beginning of line        | Editor     | `โŒ˜ + Left`                      |
296| Move to enclosing bracket        | Editor     | `Control + M`                   |
297| Move to end                      | Editor     | `โŒ˜ + Down`                      |
298| Move to end of line              | Editor     | `Control + E`                   |
299| Move to end of line              | Editor     | `End`                           |
300| Move to end of line              | Editor     | `โŒ˜ + Right`                     |
301| Move to end of paragraph         | Editor     | `Control + Down`                |
302| Move to next subword end         | Editor     | `Control + Alt + F`             |
303| Move to next subword end         | Editor     | `Control + Alt + Right`         |
304| Move to next word end            | Editor     | `Alt + F`                       |
305| Move to next word end            | Editor     | `Alt + Right`                   |
306| Move to previous subword start   | Editor     | `Control + Alt + B`             |
307| Move to previous subword start   | Editor     | `Control + Alt + Left`          |
308| Move to previous word start      | Editor     | `Alt + B`                       |
309| Move to previous word start      | Editor     | `Alt + Left`                    |
310| Move to start of paragraph       | Editor     | `Control + Up`                  |
311| Move up                          | Editor     | `Control + P`                   |
312| Move up                          | Editor     | `Up`                            |
313| Next screen                      | Editor     | `Control + L`                   |
314| Outdent                          | Editor     | `โŒ˜ + [`                         |
315| Page down                        | Editor     | `Page Down`                     |
316| Page up                          | Editor     | `Page Up`                       |
317| Paste                            | Editor     | `โŒ˜ + V`                         |
318| Redo                             | Editor     | `โŒ˜ + Shift + Z`                 |
319| Redo selection                   | Editor     | `โŒ˜ + Shift + U`                 |
320| Rename                           | Editor     | `F2`                            |
321| Reveal in File Manager           | Editor     | `Alt + โŒ˜ + R`                   |
322| Toggle hunk diff                 | Editor     | `โŒ˜ + '`                         |
323| Expand all hunk diffs            | Editor     | `โŒ˜ + "`                         |
324| Revert selected hunks            | Editor     | `โŒ˜ + Alt + Z`                   |
325| Select all                       | Editor     | `โŒ˜ + A`                         |
326| Select all matches               | Editor     | `โŒ˜ + Shift + L`                 |
327| Select down                      | Editor     | `Control + Shift + N`           |
328| Select down                      | Editor     | `Shift + Down`                  |
329| Select larger syntax node        | Editor     | `Control + Shift + Right`       |
330| Select left                      | Editor     | `Control + Shift + B`           |
331| Select left                      | Editor     | `Shift + Left`                  |
332| Select line                      | Editor     | `โŒ˜ + L`                         |
333| Select next                      | Editor     | `โŒ˜ + D`                         |
334| Select next                      | Editor     | `โŒ˜ + K, โŒ˜ + D`                  |
335| Select previous                  | Editor     | `Control + โŒ˜ + D`               |
336| Select previous                  | Editor     | `โŒ˜ + K, Control + โŒ˜ + D`        |
337| Select right                     | Editor     | `Control + Shift + F`           |
338| Select right                     | Editor     | `Shift + Right`                 |
339| Select smaller syntax node       | Editor     | `Control + Shift + Left`        |
340| Select to beginning              | Editor     | `โŒ˜ + Shift + Up`                |
341| Select to beginning of line      | Editor     | `Control + Shift + A`           |
342| Select to beginning of line      | Editor     | `Shift + Home`                  |
343| Select to beginning of line      | Editor     | `โŒ˜ + Shift + Left`              |
344| Select to end                    | Editor     | `โŒ˜ + Shift + Down`              |
345| Select to end of line            | Editor     | `Control + Shift + E`           |
346| Select to end of line            | Editor     | `Shift + End`                   |
347| Select to end of line            | Editor     | `โŒ˜ + Shift + Right`             |
348| Select to end of paragraph       | Editor     | `Control + Shift + Down`        |
349| Select to next subword end       | Editor     | `Control + Alt + Shift + F`     |
350| Select to next subword end       | Editor     | `Control + Alt + Shift + Right` |
351| Select to next word end          | Editor     | `Alt + Shift + F`               |
352| Select to next word end          | Editor     | `Alt + Shift + Right`           |
353| Select to previous subword start | Editor     | `Control + Alt + Shift + B`     |
354| Select to previous subword start | Editor     | `Control + Alt + Shift + Left`  |
355| Select to previous word start    | Editor     | `Alt + Shift + B`               |
356| Select to previous word start    | Editor     | `Alt + Shift + Left`            |
357| Select to start of paragraph     | Editor     | `Control + Shift + Up`          |
358| Select up                        | Editor     | `Control + Shift + P`           |
359| Select up                        | Editor     | `Shift + Up`                    |
360| Show character palette           | Editor     | `Control + โŒ˜ + Space`           |
361| Show completions                 | Editor     | `Control + Space`               |
362| Show inline completion           | Editor     | `Alt + \`                       |
363| Tab                              | Editor     | `Tab`                           |
364| Tab prev                         | Editor     | `Shift + Tab`                   |
365| Toggle code actions              | Editor     | `โŒ˜ + .`                         |
366| Toggle comments                  | Editor     | `โŒ˜ + /`                         |
367| Toggle git blame                 | Editor     | `โŒ˜ + Alt + G, B`                |
368| Toggle line numbers              | Editor     | `โŒ˜ + ;`                         |
369| Transpose                        | Editor     | `Control + T`                   |
370| Undo                             | Editor     | `โŒ˜ + Z`                         |
371| Undo selection                   | Editor     | `โŒ˜ + U`                         |
372| Unfold lines                     | Editor     | `Alt + โŒ˜ + ]`                   |
373
374#### Editor (Full Only)
375
376| **Command**                      | **Target**    | **Default Shortcut** |
377| -------------------------------- | ------------- | -------------------- |
378| Inline assist                    | Assistant     | `Control + Enter`    |
379| Quote selection                  | Assistant     | `โŒ˜ + >`              |
380| Deploy                           | Buffer Search | `โŒ˜ + Alt + F`        |
381| Deploy                           | Buffer Search | `โŒ˜ + E`              |
382| Deploy                           | Buffer Search | `โŒ˜ + F`              |
383| Accept partial inline completion | Editor        | `Alt + Right`        |
384| Go to hunk                       | Editor        | `โŒ˜ + F8`             |
385| Go to prev hunk                  | Editor        | `โŒ˜ + Shift + F8`     |
386| Newline                          | Editor        | `Enter`              |
387| Newline                          | Editor        | `Shift + Enter`      |
388| Newline above                    | Editor        | `โŒ˜ + Shift + Enter`  |
389| Newline below                    | Editor        | `โŒ˜ + Enter`          |
390| Next inline completion           | Editor        | `Alt + ]`            |
391| Open excerpts                    | Editor        | `Alt + Enter`        |
392| Open excerpts split              | Editor        | `โŒ˜ + K, Enter`       |
393| Previous inline completion       | Editor        | `Alt + [`            |
394| Toggle soft wrap                 | Editor        | `Alt + Z`            |
395| Toggle                           | Go To Line    | `Control + G`        |
396| Toggle                           | Outline       | `โŒ˜ + Shift + O`      |
397
398#### Editor (Auto Height Only)
399
400| **Command**   | **Target** | **Default Shortcut**      |
401| ------------- | ---------- | ------------------------- |
402| Newline       | Editor     | `Control + Enter`         |
403| Newline       | Editor     | `Shift + Enter`           |
404| Newline below | Editor     | `Control + Shift + Enter` |
405
406#### Pane
407
408| **Command**                   | **Target**     | **Default Shortcut**    |
409| ----------------------------- | -------------- | ----------------------- |
410| Activate item 1               | Pane           | `Control + 1`           |
411| Activate item 2               | Pane           | `Control + 2`           |
412| Activate item 3               | Pane           | `Control + 3`           |
413| Activate item 4               | Pane           | `Control + 4`           |
414| Activate item 5               | Pane           | `Control + 5`           |
415| Activate item 6               | Pane           | `Control + 6`           |
416| Activate item 7               | Pane           | `Control + 7`           |
417| Activate item 8               | Pane           | `Control + 8`           |
418| Activate item 9               | Pane           | `Control + 9`           |
419| Activate last item            | Pane           | `Control + 0`           |
420| Activate next item            | Pane           | `Alt + โŒ˜ + Right`       |
421| Activate next item            | Pane           | `โŒ˜ + }`                 |
422| Activate prev item            | Pane           | `Alt + โŒ˜ + Left`        |
423| Activate prev item            | Pane           | `โŒ˜ + {`                 |
424| Close active item             | Pane           | `โŒ˜ + W`                 |
425| Close all items               | Pane           | `โŒ˜ + K, โŒ˜ + W`          |
426| Close clean items             | Pane           | `โŒ˜ + K, U`              |
427| Close inactive items          | Pane           | `Alt + โŒ˜ + T`           |
428| Go back                       | Pane           | `Control + -`           |
429| Go forward                    | Pane           | `Control + _`           |
430| Reopen closed item            | Pane           | `โŒ˜ + Shift + T`         |
431| Split down                    | Pane           | `โŒ˜ + K, Down`           |
432| Split left                    | Pane           | `โŒ˜ + K, Left`           |
433| Split right                   | Pane           | `โŒ˜ + K, Right`          |
434| Split up                      | Pane           | `โŒ˜ + K, Up`             |
435| Toggle filters                | Project Search | `Alt + โŒ˜ + F`           |
436| Toggle focus                  | Project Search | `โŒ˜ + F`                 |
437| Toggle focus                  | Project Search | `โŒ˜ + Shift + F`         |
438| Activate regex mode           | Search         | `Alt + โŒ˜ + G`           |
439| Activate text mode            | Search         | `Alt + โŒ˜ + X`           |
440| Cycle mode                    | Search         | `Alt + Tab`             |
441| Select all matches            | Search         | `Alt + Enter`           |
442| Select next match             | Search         | `โŒ˜ + G`                 |
443| Select prev match             | Search         | `โŒ˜ + Shift + G`         |
444| Toggle case sensitive         | Search         | `Alt + โŒ˜ + C`           |
445| Toggle replace                | Search         | `โŒ˜ + Shift + H`         |
446| Toggle whole word             | Search         | `Alt + โŒ˜ + W`           |
447| Close inactive tabs and panes | Workspace      | `Control + Alt + โŒ˜ + W` |
448
449#### Buffer Search Bar
450
451| **Command**            | **Target**    | **Default Shortcut** |
452| ---------------------- | ------------- | -------------------- |
453| Dismiss                | Buffer Search | `Escape`             |
454| Focus editor           | Buffer Search | `Tab`                |
455| Cycle mode             | Search        | `Alt + Tab`          |
456| Focus search           | Search        | `โŒ˜ + F`              |
457| Next history query     | Search        | `Down`               |
458| Previous history query | Search        | `Up`                 |
459| Replace all            | Search        | `โŒ˜ + Enter`          |
460| Replace next           | Search        | `Enter`              |
461| Select all matches     | Search        | `Alt + Enter`        |
462| Select next match      | Search        | `Enter`              |
463| Select prev match      | Search        | `Shift + Enter`      |
464| Toggle replace         | Search        | `โŒ˜ + Alt + F`        |
465
466#### Workspace
467
468| **Command**                      | **Target**        | **Default Shortcut**    |
469| -------------------------------- | ----------------- | ----------------------- |
470| Toggle focus                     | Assistant         | `โŒ˜ + ?`                 |
471| Open recent                      | Branches          | `Alt + โŒ˜ + B`           |
472| Toggle                           | Command Palette   | `โŒ˜ + Shift + P`         |
473| Deploy                           | Diagnostics       | `โŒ˜ + Shift + M`         |
474| Toggle                           | File Finder       | `โŒ˜ + P`                 |
475| Toggle                           | Language Selector | `โŒ˜ + K, M`              |
476| Deploy search                    | Pane              | `โŒ˜ + Shift + F`         |
477| Deploy search                    | Pane              | `โŒ˜ + Shift + H`         |
478| Toggle focus                     | Project Panel     | `โŒ˜ + Shift + E`         |
479| Toggle                           | Project Symbols   | `โŒ˜ + T`                 |
480| Open recent                      | Projects          | `Alt + โŒ˜ + O`           |
481| Toggle                           | Tab Switcher      | `Control + Shift + Tab` |
482| Toggle                           | Tab Switcher      | `Control + Tab`         |
483| Rerun                            | Task              | `Alt + T`               |
484| Spawn                            | Task              | `Alt + Shift + T`       |
485| Toggle focus                     | Terminal Panel    | ``Control + ` ``        |
486| Toggle                           | Theme Selector    | `โŒ˜ + K, โŒ˜ + T`          |
487| Activate pane 1                  | Workspace         | `โŒ˜ + 1`                 |
488| Activate pane 2                  | Workspace         | `โŒ˜ + 2`                 |
489| Activate pane 3                  | Workspace         | `โŒ˜ + 3`                 |
490| Activate pane 4                  | Workspace         | `โŒ˜ + 4`                 |
491| Activate pane 5                  | Workspace         | `โŒ˜ + 5`                 |
492| Activate pane 6                  | Workspace         | `โŒ˜ + 6`                 |
493| Activate pane 7                  | Workspace         | `โŒ˜ + 7`                 |
494| Activate pane 8                  | Workspace         | `โŒ˜ + 8`                 |
495| Activate pane 9                  | Workspace         | `โŒ˜ + 9`                 |
496| Activate pane in direction down  | Workspace         | `โŒ˜ + K, โŒ˜ + Down`       |
497| Activate pane in direction left  | Workspace         | `โŒ˜ + K, โŒ˜ + Left`       |
498| Activate pane in direction right | Workspace         | `โŒ˜ + K, โŒ˜ + Right`      |
499| Activate pane in direction up    | Workspace         | `โŒ˜ + K, โŒ˜ + Up`         |
500| Close all docks                  | Workspace         | `Alt + โŒ˜ + Y`           |
501| New file                         | Workspace         | `โŒ˜ + N`                 |
502| New terminal                     | Workspace         | `Control + ~`           |
503| New window                       | Workspace         | `โŒ˜ + Shift + N`         |
504| Save                             | Workspace         | `โŒ˜ + S`                 |
505| Save all                         | Workspace         | `โŒ˜ + Alt + S`           |
506| Save as                          | Workspace         | `โŒ˜ + Shift + S`         |
507| Save without format              | Workspace         | `โŒ˜ + K, S`              |
508| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Down`   |
509| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Left`   |
510| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Right`  |
511| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Up`     |
512| Toggle bottom dock               | Workspace         | `โŒ˜ + J`                 |
513| Toggle left dock                 | Workspace         | `โŒ˜ + B`                 |
514| Toggle right dock                | Workspace         | `โŒ˜ + R`                 |
515| Unfollow                         | Workspace         | `Escape`                |
516| Open keymap                      | Zed               | `โŒ˜ + K, โŒ˜ + S`          |
517
518#### Project Panel
519
520| **Command**             | **Target**    | **Default Shortcut**  |
521| ----------------------- | ------------- | --------------------- |
522| Collapse selected entry | Project Panel | `Left`                |
523| Copy                    | Project Panel | `โŒ˜ + C`               |
524| Copy path               | Project Panel | `โŒ˜ + Alt + C`         |
525| Copy relative path      | Project Panel | `Alt + โŒ˜ + Shift + C` |
526| Cut                     | Project Panel | `โŒ˜ + X`               |
527| Delete                  | Project Panel | `Backspace`           |
528| Delete                  | Project Panel | `Delete`              |
529| Delete                  | Project Panel | `โŒ˜ + Backspace`       |
530| Delete                  | Project Panel | `โŒ˜ + Delete`          |
531| Expand selected entry   | Project Panel | `Right`               |
532| New directory           | Project Panel | `Alt + โŒ˜ + N`         |
533| New file                | Project Panel | `โŒ˜ + N`               |
534| New search in directory | Project Panel | `Alt + Shift + F`     |
535| Open                    | Project Panel | `Space`               |
536| Paste                   | Project Panel | `โŒ˜ + V`               |
537| Rename                  | Project Panel | `Enter`               |
538| Rename                  | Project Panel | `F2`                  |
539| Reveal in File Manager  | Project Panel | `Alt + โŒ˜ + R`         |
540
541#### Project Search Bar
542
543| **Command**            | **Target**     | **Default Shortcut** |
544| ---------------------- | -------------- | -------------------- |
545| Search in new          | Project Search | `โŒ˜ + Enter`          |
546| Toggle focus           | Project Search | `Escape`             |
547| Activate regex mode    | Search         | `Alt + โŒ˜ + G`        |
548| Activate text mode     | Search         | `Alt + โŒ˜ + X`        |
549| Cycle mode             | Search         | `Alt + Tab`          |
550| Focus search           | Search         | `โŒ˜ + Shift + F`      |
551| Next history query     | Search         | `Down`               |
552| Previous history query | Search         | `Up`                 |
553| Replace all            | Search         | `โŒ˜ + Enter`          |
554| Replace next           | Search         | `Enter`              |
555| Toggle replace         | Search         | `โŒ˜ + Shift + H`      |
556
557#### Terminal
558
559| **Command**                 | **Target** | **Default Shortcut**  |
560| --------------------------- | ---------- | --------------------- |
561| Clear                       | Terminal   | `โŒ˜ + K`               |
562| Copy                        | Terminal   | `โŒ˜ + C`               |
563| Delete line                 | Terminal   | `โŒ˜ + Backspace`       |
564| Move to beginning of line   | Terminal   | `โŒ˜ + Left`            |
565| Move to end of line         | Terminal   | `โŒ˜ + Right`           |
566| Move to next word end       | Terminal   | `Alt + Right`         |
567| Move to previous word start | Terminal   | `Alt + Left`          |
568| Paste                       | Terminal   | `โŒ˜ + V`               |
569| Show character palette      | Terminal   | `Control + โŒ˜ + Space` |
570
571#### Assistant Editor
572
573| **Command**        | **Target** | **Default Shortcut** |
574| ------------------ | ---------- | -------------------- |
575| Assist             | Assistant  | `โŒ˜ + Enter`          |
576| Cycle message role | Assistant  | `Control + R`        |
577| Quote selection    | Assistant  | `โŒ˜ + >`              |
578| Split              | Assistant  | `Shift + Enter`      |
579| Save               | Workspace  | `โŒ˜ + S`              |