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
180<!--
181TBD: Update these to reflect current bindings
182TBD: Add Column with Linux shortcuts
183-->
184
185| **Command**               | **Target**   | **Default Shortcut**    |
186| ------------------------- | ------------ | ----------------------- |
187| Toggle focus              | Collab Panel | `โŒ˜ + Shift + C`         |
188| Toggle inlay hints        | Editor       | `Control + :`           |
189| Cancel                    | Menu         | `Control + C`           |
190| Cancel                    | Menu         | `Control + Escape`      |
191| Cancel                    | Menu         | `Escape`                |
192| Cancel                    | Menu         | `โŒ˜ + Escape`            |
193| Confirm                   | Menu         | `Enter`                 |
194| Secondary confirm         | Menu         | `Control + Enter`       |
195| Secondary confirm         | Menu         | `โŒ˜ + Enter`             |
196| Select first              | Menu         | `Page Up`               |
197| Select first              | Menu         | `Shift + Page Down`     |
198| Select first              | Menu         | `Shift + Page Up`       |
199| Select first              | Menu         | `โŒ˜ + Up`                |
200| Select last               | Menu         | `Page Down`             |
201| Select last               | Menu         | `โŒ˜ + Down`              |
202| Select next               | Menu         | `Control + N`           |
203| Select next               | Menu         | `Down`                  |
204| Select prev               | Menu         | `Control + P`           |
205| Select prev               | Menu         | `Up`                    |
206| Confirm input             | Picker       | `Alt + Enter`           |
207| Confirm input             | Picker       | `โŒ˜ + Alt + Enter`       |
208| Use selected query        | Picker       | `Shift + Enter`         |
209| Close window              | Workspace    | `โŒ˜ + Shift + W`         |
210| Follow next collaborator  | Workspace    | `Control + Alt + โŒ˜ + F` |
211| Open                      | Workspace    | `โŒ˜ + O`                 |
212| Toggle zoom               | Workspace    | `Shift + Escape`        |
213| Debug elements            | Zed          | `โŒ˜ + Alt + I`           |
214| Decrease buffer font size | Zed          | `โŒ˜ + -`                 |
215| Hide                      | Zed          | `โŒ˜ + H`                 |
216| Hide others               | Zed          | `Alt + โŒ˜ + H`           |
217| Increase buffer font size | Zed          | `โŒ˜ + +`                 |
218| Increase buffer font size | Zed          | `โŒ˜ + =`                 |
219| Minimize                  | Zed          | `โŒ˜ + M`                 |
220| Open settings             | Zed          | `โŒ˜ + ,`                 |
221| Quit                      | Zed          | `โŒ˜ + Q`                 |
222| Reset buffer font size    | Zed          | `โŒ˜ + 0`                 |
223| Toggle full screen        | Zed          | `Control + โŒ˜ + F`       |
224
225#### Editor
226
227| **Command**                      | **Target** | **Default Shortcut**            |
228| -------------------------------- | ---------- | ------------------------------- |
229| Add selection above              | Editor     | `โŒ˜ + Alt + Up`                  |
230| Add selection above              | Editor     | `โŒ˜ + Control + P`               |
231| Add selection below              | Editor     | `โŒ˜ + Alt + Down`                |
232| Add selection below              | Editor     | `โŒ˜ + Control + N`               |
233| Backspace                        | Editor     | `Backspace`                     |
234| Backspace                        | Editor     | `Control + H`                   |
235| Backspace                        | Editor     | `Shift + Backspace`             |
236| Cancel                           | Editor     | `Escape`                        |
237| Confirm code action              | Editor     | `Enter`                         |
238| Confirm completion               | Editor     | `Enter`                         |
239| Confirm completion               | Editor     | `Tab`                           |
240| Confirm rename                   | Editor     | `Enter`                         |
241| Context menu first               | Editor     | `Page Up`                       |
242| Context menu last                | Editor     | `Page Down`                     |
243| Context menu next                | Editor     | `Control + N`                   |
244| Context menu next                | Editor     | `Down`                          |
245| Context menu prev                | Editor     | `Control + P`                   |
246| Context menu prev                | Editor     | `Up`                            |
247| Copy                             | Editor     | `โŒ˜ + C`                         |
248| Cut                              | Editor     | `โŒ˜ + X`                         |
249| Cut to end of line               | Editor     | `Control + K`                   |
250| Select Next                      | Editor     | `Control + D`                   |
251| Delete                           | Editor     | `Delete`                        |
252| Delete line                      | Editor     | `โŒ˜ + Shift + K`                 |
253| Delete to beginning of line      | Editor     | `โŒ˜ + Backspace`                 |
254| Delete to end of line            | Editor     | `โŒ˜ + Delete`                    |
255| Delete to next subword end       | Editor     | `Control + Alt + D`             |
256| Delete to next subword end       | Editor     | `Control + Alt + Delete`        |
257| Delete to next word end          | Editor     | `Alt + D`                       |
258| Delete to next word end          | Editor     | `Alt + Delete`                  |
259| Delete to previous subword start | Editor     | `Control + Alt + Backspace`     |
260| Delete to previous subword start | Editor     | `Control + Alt + H`             |
261| Delete to previous word start    | Editor     | `Alt + Backspace`               |
262| Delete to previous word start    | Editor     | `Alt + H`                       |
263| Delete to previous word start    | Editor     | `Control + W`                   |
264| Display cursor names             | Editor     | `Control + โŒ˜ + C`               |
265| Duplicate line down              | Editor     | `Alt + Shift + Down`            |
266| Duplicate line up                | Editor     | `Alt + Shift + Up`              |
267| Find all references              | Editor     | `Alt + Shift + F12`             |
268| Fold                             | Editor     | `Alt + โŒ˜ + [`                   |
269| Format                           | Editor     | `โŒ˜ + Shift + I`                 |
270| Go to definition                 | Editor     | `F12`                           |
271| Go to definition split           | Editor     | `Alt + F12`                     |
272| Go to declaration                | Editor     | `Ctrl + F12`                    |
273| Go to declaration split          | Editor     | `Alt + Ctrl + F12`              |
274| Go to diagnostic                 | Editor     | `F8`                            |
275| Go to implementation             | Editor     | `Shift + F12`                   |
276| Go to prev diagnostic            | Editor     | `Shift + F8`                    |
277| Go to type definition            | Editor     | `โŒ˜ + F12`                       |
278| Go to type definition split      | Editor     | `Alt + โŒ˜ + F12`                 |
279| Hover                            | Editor     | `โŒ˜ + K, โŒ˜ + I`                  |
280| Indent                           | Editor     | `โŒ˜ + ]`                         |
281| Join lines                       | Editor     | `Control + J`                   |
282| Move down                        | Editor     | `Control + N`                   |
283| Move down                        | Editor     | `Down`                          |
284| Move left                        | Editor     | `Control + B`                   |
285| Move left                        | Editor     | `Left`                          |
286| Move line down                   | Editor     | `Alt + Down`                    |
287| Move line up                     | Editor     | `Alt + Up`                      |
288| Move page down                   | Editor     | `Control + V`                   |
289| Move page down                   | Editor     | `Shift + Page Down`             |
290| Move page up                     | Editor     | `Alt + V`                       |
291| Move page up                     | Editor     | `Shift + Page Up`               |
292| Move right                       | Editor     | `Control + F`                   |
293| Move right                       | Editor     | `Right`                         |
294| Move to beginning                | Editor     | `โŒ˜ + Up`                        |
295| Move to beginning of line        | Editor     | `Control + A`                   |
296| Move to beginning of line        | Editor     | `Home`                          |
297| Move to beginning of line        | Editor     | `โŒ˜ + Left`                      |
298| Move to enclosing bracket        | Editor     | `Control + M`                   |
299| Move to end                      | Editor     | `โŒ˜ + Down`                      |
300| Move to end of line              | Editor     | `Control + E`                   |
301| Move to end of line              | Editor     | `End`                           |
302| Move to end of line              | Editor     | `โŒ˜ + Right`                     |
303| Move to end of paragraph         | Editor     | `Control + Down`                |
304| Move to next subword end         | Editor     | `Control + Alt + F`             |
305| Move to next subword end         | Editor     | `Control + Alt + Right`         |
306| Move to next word end            | Editor     | `Alt + F`                       |
307| Move to next word end            | Editor     | `Alt + Right`                   |
308| Move to previous subword start   | Editor     | `Control + Alt + B`             |
309| Move to previous subword start   | Editor     | `Control + Alt + Left`          |
310| Move to previous word start      | Editor     | `Alt + B`                       |
311| Move to previous word start      | Editor     | `Alt + Left`                    |
312| Move to start of paragraph       | Editor     | `Control + Up`                  |
313| Move up                          | Editor     | `Control + P`                   |
314| Move up                          | Editor     | `Up`                            |
315| Next screen                      | Editor     | `Control + L`                   |
316| Outdent                          | Editor     | `โŒ˜ + [`                         |
317| Page down                        | Editor     | `Page Down`                     |
318| Page up                          | Editor     | `Page Up`                       |
319| Paste                            | Editor     | `โŒ˜ + V`                         |
320| Redo                             | Editor     | `โŒ˜ + Shift + Z`                 |
321| Redo selection                   | Editor     | `โŒ˜ + Shift + U`                 |
322| Rename                           | Editor     | `F2`                            |
323| Reveal in File Manager           | Editor     | `Alt + โŒ˜ + R`                   |
324| Toggle hunk diff                 | Editor     | `โŒ˜ + '`                         |
325| Expand all hunk diffs            | Editor     | `โŒ˜ + "`                         |
326| Revert selected hunks            | Editor     | `โŒ˜ + Alt + Z`                   |
327| Select all                       | Editor     | `โŒ˜ + A`                         |
328| Select all matches               | Editor     | `โŒ˜ + Shift + L`                 |
329| Select down                      | Editor     | `Control + Shift + N`           |
330| Select down                      | Editor     | `Shift + Down`                  |
331| Select larger syntax node        | Editor     | `Control + Shift + Right`       |
332| Select left                      | Editor     | `Control + Shift + B`           |
333| Select left                      | Editor     | `Shift + Left`                  |
334| Select line                      | Editor     | `โŒ˜ + L`                         |
335| Select next                      | Editor     | `โŒ˜ + D`                         |
336| Select next                      | Editor     | `โŒ˜ + K, โŒ˜ + D`                  |
337| Select previous                  | Editor     | `Control + โŒ˜ + D`               |
338| Select previous                  | Editor     | `โŒ˜ + K, Control + โŒ˜ + D`        |
339| Select right                     | Editor     | `Control + Shift + F`           |
340| Select right                     | Editor     | `Shift + Right`                 |
341| Select smaller syntax node       | Editor     | `Control + Shift + Left`        |
342| Select to beginning              | Editor     | `โŒ˜ + Shift + Up`                |
343| Select to beginning of line      | Editor     | `Control + Shift + A`           |
344| Select to beginning of line      | Editor     | `Shift + Home`                  |
345| Select to beginning of line      | Editor     | `โŒ˜ + Shift + Left`              |
346| Select to end                    | Editor     | `โŒ˜ + Shift + Down`              |
347| Select to end of line            | Editor     | `Control + Shift + E`           |
348| Select to end of line            | Editor     | `Shift + End`                   |
349| Select to end of line            | Editor     | `โŒ˜ + Shift + Right`             |
350| Select to end of paragraph       | Editor     | `Control + Shift + Down`        |
351| Select to next subword end       | Editor     | `Control + Alt + Shift + F`     |
352| Select to next subword end       | Editor     | `Control + Alt + Shift + Right` |
353| Select to next word end          | Editor     | `Alt + Shift + F`               |
354| Select to next word end          | Editor     | `Alt + Shift + Right`           |
355| Select to previous subword start | Editor     | `Control + Alt + Shift + B`     |
356| Select to previous subword start | Editor     | `Control + Alt + Shift + Left`  |
357| Select to previous word start    | Editor     | `Alt + Shift + B`               |
358| Select to previous word start    | Editor     | `Alt + Shift + Left`            |
359| Select to start of paragraph     | Editor     | `Control + Shift + Up`          |
360| Select up                        | Editor     | `Control + Shift + P`           |
361| Select up                        | Editor     | `Shift + Up`                    |
362| Show character palette           | Editor     | `Control + โŒ˜ + Space`           |
363| Show completions                 | Editor     | `Control + Space`               |
364| Show inline completion           | Editor     | `Alt + \`                       |
365| Tab                              | Editor     | `Tab`                           |
366| Tab prev                         | Editor     | `Shift + Tab`                   |
367| Toggle code actions              | Editor     | `โŒ˜ + .`                         |
368| Toggle comments                  | Editor     | `โŒ˜ + /`                         |
369| Toggle git blame                 | Editor     | `โŒ˜ + Alt + G, B`                |
370| Toggle line numbers              | Editor     | `โŒ˜ + ;`                         |
371| Transpose                        | Editor     | `Control + T`                   |
372| Undo                             | Editor     | `โŒ˜ + Z`                         |
373| Undo selection                   | Editor     | `โŒ˜ + U`                         |
374| Unfold lines                     | Editor     | `Alt + โŒ˜ + ]`                   |
375
376#### Editor (Full Only)
377
378| **Command**                      | **Target**    | **Default Shortcut** |
379| -------------------------------- | ------------- | -------------------- |
380| Inline assist                    | Assistant     | `Control + Enter`    |
381| Quote selection                  | Assistant     | `โŒ˜ + >`              |
382| Deploy                           | Buffer Search | `โŒ˜ + Alt + F`        |
383| Deploy                           | Buffer Search | `โŒ˜ + E`              |
384| Deploy                           | Buffer Search | `โŒ˜ + F`              |
385| Accept partial inline completion | Editor        | `Alt + Right`        |
386| Go to hunk                       | Editor        | `โŒ˜ + F8`             |
387| Go to prev hunk                  | Editor        | `โŒ˜ + Shift + F8`     |
388| Newline                          | Editor        | `Enter`              |
389| Newline                          | Editor        | `Shift + Enter`      |
390| Newline above                    | Editor        | `โŒ˜ + Shift + Enter`  |
391| Newline below                    | Editor        | `โŒ˜ + Enter`          |
392| Next inline completion           | Editor        | `Alt + ]`            |
393| Open excerpts                    | Editor        | `Alt + Enter`        |
394| Open excerpts split              | Editor        | `โŒ˜ + K, Enter`       |
395| Previous inline completion       | Editor        | `Alt + [`            |
396| Toggle soft wrap                 | Editor        | `Alt + Z`            |
397| Toggle                           | Go To Line    | `Control + G`        |
398| Toggle                           | Outline       | `โŒ˜ + Shift + O`      |
399
400#### Editor (Auto Height Only)
401
402| **Command**   | **Target** | **Default Shortcut**      |
403| ------------- | ---------- | ------------------------- |
404| Newline       | Editor     | `Control + Enter`         |
405| Newline       | Editor     | `Shift + Enter`           |
406| Newline below | Editor     | `Control + Shift + Enter` |
407
408#### Pane
409
410| **Command**                   | **Target**     | **Default Shortcut**          |
411| ----------------------------- | -------------- | ----------------------------- |
412| Activate item 1               | Pane           | `Control + 1`                 |
413| Activate item 2               | Pane           | `Control + 2`                 |
414| Activate item 3               | Pane           | `Control + 3`                 |
415| Activate item 4               | Pane           | `Control + 4`                 |
416| Activate item 5               | Pane           | `Control + 5`                 |
417| Activate item 6               | Pane           | `Control + 6`                 |
418| Activate item 7               | Pane           | `Control + 7`                 |
419| Activate item 8               | Pane           | `Control + 8`                 |
420| Activate item 9               | Pane           | `Control + 9`                 |
421| Activate last item            | Pane           | `Control + 0`                 |
422| Activate next item            | Pane           | `Alt + โŒ˜ + Right`             |
423| Activate next item            | Pane           | `โŒ˜ + }`                       |
424| Activate prev item            | Pane           | `Alt + โŒ˜ + Left`              |
425| Activate prev item            | Pane           | `โŒ˜ + {`                       |
426| Swap item to left             | Pane           | `Control + Shift + Page Up`   |
427| Swap item to right            | Pane           | `Control + Shift + Page Down` |
428| Close active item             | Pane           | `โŒ˜ + W`                       |
429| Close all items               | Pane           | `โŒ˜ + K, โŒ˜ + W`                |
430| Close clean items             | Pane           | `โŒ˜ + K, U`                    |
431| Close inactive items          | Pane           | `Alt + โŒ˜ + T`                 |
432| Go back                       | Pane           | `Control + -`                 |
433| Go forward                    | Pane           | `Control + Shift + _`         |
434| Reopen closed item            | Pane           | `โŒ˜ + Shift + T`               |
435| Split down                    | Pane           | `โŒ˜ + K, Down`                 |
436| Split left                    | Pane           | `โŒ˜ + K, Left`                 |
437| Split right                   | Pane           | `โŒ˜ + K, Right`                |
438| Split up                      | Pane           | `โŒ˜ + K, Up`                   |
439| Toggle filters                | Project Search | `Alt + โŒ˜ + F`                 |
440| Toggle focus                  | Project Search | `โŒ˜ + F`                       |
441| Toggle focus                  | Project Search | `โŒ˜ + Shift + F`               |
442| Activate regex mode           | Search         | `Alt + โŒ˜ + G`                 |
443| Activate text mode            | Search         | `Alt + โŒ˜ + X`                 |
444| Cycle mode                    | Search         | `Alt + Tab`                   |
445| Select all matches            | Search         | `Alt + Enter`                 |
446| Select next match             | Search         | `โŒ˜ + G`                       |
447| Select prev match             | Search         | `โŒ˜ + Shift + G`               |
448| Toggle case sensitive         | Search         | `Alt + โŒ˜ + C`                 |
449| Toggle replace                | Search         | `โŒ˜ + Shift + H`               |
450| Toggle whole word             | Search         | `Alt + โŒ˜ + W`                 |
451| Close inactive tabs and panes | Workspace      | `Control + Alt + โŒ˜ + W`       |
452
453#### Buffer Search Bar
454
455| **Command**            | **Target**    | **Default Shortcut** |
456| ---------------------- | ------------- | -------------------- |
457| Dismiss                | Buffer Search | `Escape`             |
458| Focus editor           | Buffer Search | `Tab`                |
459| Cycle mode             | Search        | `Alt + Tab`          |
460| Focus search           | Search        | `โŒ˜ + F`              |
461| Next history query     | Search        | `Down`               |
462| Previous history query | Search        | `Up`                 |
463| Replace all            | Search        | `โŒ˜ + Enter`          |
464| Replace next           | Search        | `Enter`              |
465| Select all matches     | Search        | `Alt + Enter`        |
466| Select next match      | Search        | `Enter`              |
467| Select prev match      | Search        | `Shift + Enter`      |
468| Toggle replace         | Search        | `โŒ˜ + Alt + F`        |
469
470#### Workspace
471
472| **Command**                      | **Target**        | **Default Shortcut**    |
473| -------------------------------- | ----------------- | ----------------------- |
474| Toggle focus                     | Assistant         | `โŒ˜ + ?`                 |
475| Open recent                      | Branches          | `Alt + โŒ˜ + B`           |
476| Toggle                           | Command Palette   | `โŒ˜ + Shift + P`         |
477| Deploy                           | Diagnostics       | `โŒ˜ + Shift + M`         |
478| Toggle                           | File Finder       | `โŒ˜ + P`                 |
479| Toggle                           | Language Selector | `โŒ˜ + K, M`              |
480| Deploy search                    | Pane              | `โŒ˜ + Shift + F`         |
481| Deploy search                    | Pane              | `โŒ˜ + Shift + H`         |
482| Toggle focus                     | Project Panel     | `โŒ˜ + Shift + E`         |
483| Toggle                           | Project Symbols   | `โŒ˜ + T`                 |
484| Open recent                      | Projects          | `Alt + โŒ˜ + O`           |
485| Toggle                           | Tab Switcher      | `Control + Shift + Tab` |
486| Toggle                           | Tab Switcher      | `Control + Tab`         |
487| Rerun                            | Task              | `Alt + T`               |
488| Spawn                            | Task              | `Alt + Shift + T`       |
489| Toggle focus                     | Terminal Panel    | ``Control + ` ``        |
490| Toggle                           | Theme Selector    | `โŒ˜ + K, โŒ˜ + T`          |
491| Activate pane 1                  | Workspace         | `โŒ˜ + 1`                 |
492| Activate pane 2                  | Workspace         | `โŒ˜ + 2`                 |
493| Activate pane 3                  | Workspace         | `โŒ˜ + 3`                 |
494| Activate pane 4                  | Workspace         | `โŒ˜ + 4`                 |
495| Activate pane 5                  | Workspace         | `โŒ˜ + 5`                 |
496| Activate pane 6                  | Workspace         | `โŒ˜ + 6`                 |
497| Activate pane 7                  | Workspace         | `โŒ˜ + 7`                 |
498| Activate pane 8                  | Workspace         | `โŒ˜ + 8`                 |
499| Activate pane 9                  | Workspace         | `โŒ˜ + 9`                 |
500| Activate pane in direction down  | Workspace         | `โŒ˜ + K, โŒ˜ + Down`       |
501| Activate pane in direction left  | Workspace         | `โŒ˜ + K, โŒ˜ + Left`       |
502| Activate pane in direction right | Workspace         | `โŒ˜ + K, โŒ˜ + Right`      |
503| Activate pane in direction up    | Workspace         | `โŒ˜ + K, โŒ˜ + Up`         |
504| Close all docks                  | Workspace         | `Alt + โŒ˜ + Y`           |
505| New file                         | Workspace         | `โŒ˜ + N`                 |
506| New terminal                     | Workspace         | `Control + ~`           |
507| New window                       | Workspace         | `โŒ˜ + Shift + N`         |
508| Save                             | Workspace         | `โŒ˜ + S`                 |
509| Save all                         | Workspace         | `โŒ˜ + Alt + S`           |
510| Save as                          | Workspace         | `โŒ˜ + Shift + S`         |
511| Save without format              | Workspace         | `โŒ˜ + K, S`              |
512| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Down`   |
513| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Left`   |
514| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Right`  |
515| Swap pane in direction           | Workspace         | `โŒ˜ + K, Shift + Up`     |
516| Toggle bottom dock               | Workspace         | `โŒ˜ + J`                 |
517| Toggle left dock                 | Workspace         | `โŒ˜ + B`                 |
518| Toggle right dock                | Workspace         | `โŒ˜ + R`                 |
519| Unfollow                         | Workspace         | `Escape`                |
520| Open keymap                      | Zed               | `โŒ˜ + K, โŒ˜ + S`          |
521
522#### Project Panel
523
524| **Command**             | **Target**    | **Default Shortcut**  |
525| ----------------------- | ------------- | --------------------- |
526| Collapse selected entry | Project Panel | `Left`                |
527| Copy                    | Project Panel | `โŒ˜ + C`               |
528| Copy path               | Project Panel | `โŒ˜ + Alt + C`         |
529| Copy relative path      | Project Panel | `Alt + โŒ˜ + Shift + C` |
530| Cut                     | Project Panel | `โŒ˜ + X`               |
531| Delete                  | Project Panel | `Backspace`           |
532| Delete                  | Project Panel | `Delete`              |
533| Delete                  | Project Panel | `โŒ˜ + Backspace`       |
534| Delete                  | Project Panel | `โŒ˜ + Delete`          |
535| Expand selected entry   | Project Panel | `Right`               |
536| New directory           | Project Panel | `Alt + โŒ˜ + N`         |
537| New file                | Project Panel | `โŒ˜ + N`               |
538| New search in directory | Project Panel | `Alt + Shift + F`     |
539| Open                    | Project Panel | `Space`               |
540| Paste                   | Project Panel | `โŒ˜ + V`               |
541| Rename                  | Project Panel | `Enter`               |
542| Rename                  | Project Panel | `F2`                  |
543| Reveal in File Manager  | Project Panel | `Alt + โŒ˜ + R`         |
544
545#### Project Search Bar
546
547| **Command**            | **Target**     | **Default Shortcut** |
548| ---------------------- | -------------- | -------------------- |
549| Search in new          | Project Search | `โŒ˜ + Enter`          |
550| Toggle focus           | Project Search | `Escape`             |
551| Activate regex mode    | Search         | `Alt + โŒ˜ + G`        |
552| Activate text mode     | Search         | `Alt + โŒ˜ + X`        |
553| Cycle mode             | Search         | `Alt + Tab`          |
554| Focus search           | Search         | `โŒ˜ + Shift + F`      |
555| Next history query     | Search         | `Down`               |
556| Previous history query | Search         | `Up`                 |
557| Replace all            | Search         | `โŒ˜ + Enter`          |
558| Replace next           | Search         | `Enter`              |
559| Toggle replace         | Search         | `โŒ˜ + Shift + H`      |
560
561#### Terminal
562
563| **Command**                 | **Target** | **Default Shortcut**  |
564| --------------------------- | ---------- | --------------------- |
565| Clear                       | Terminal   | `โŒ˜ + K`               |
566| Copy                        | Terminal   | `โŒ˜ + C`               |
567| Delete line                 | Terminal   | `โŒ˜ + Backspace`       |
568| Move to beginning of line   | Terminal   | `โŒ˜ + Left`            |
569| Move to end of line         | Terminal   | `โŒ˜ + Right`           |
570| Move to next word end       | Terminal   | `Alt + Right`         |
571| Move to previous word start | Terminal   | `Alt + Left`          |
572| Paste                       | Terminal   | `โŒ˜ + V`               |
573| Show character palette      | Terminal   | `Control + โŒ˜ + Space` |
574
575#### Assistant Editor
576
577| **Command**        | **Target** | **Default Shortcut** |
578| ------------------ | ---------- | -------------------- |
579| Assist             | Assistant  | `โŒ˜ + Enter`          |
580| Cycle message role | Assistant  | `Control + R`        |
581| Quote selection    | Assistant  | `โŒ˜ + >`              |
582| Split              | Assistant  | `Shift + Enter`      |
583| Save               | Workspace  | `โŒ˜ + S`              |