> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/sxyazi/yazi/llms.txt
> Use this file to discover all available pages before exploring further.

# Keybindings

> Complete default keybinding reference for Yazi

This is a comprehensive reference of all default keybindings in Yazi, extracted from the source code.

<Note>
  All keybindings can be customized in `~/.config/yazi/keymap.toml`. This reference shows the default configuration.
</Note>

## Manager (File Browser)

The main file manager interface keybindings.

### Quit and Exit

| Key     | Command              | Description                                         |
| ------- | -------------------- | --------------------------------------------------- |
| `q`     | `quit`               | Quit Yazi                                           |
| `Q`     | `quit --no-cwd-file` | Quit without writing cwd-file                       |
| `<C-c>` | `close`              | Close current tab (or quit if last)                 |
| `<C-z>` | `suspend`            | Suspend the process                                 |
| `<Esc>` | `escape`             | Exit visual mode, clear selection, or cancel search |
| `<C-[>` | `escape`             | Same as Esc                                         |

### Navigation - Vertical

| Key                      | Command       | Description            |
| ------------------------ | ------------- | ---------------------- |
| `k` / `<Up>`             | `arrow prev`  | Move to previous file  |
| `j` / `<Down>`           | `arrow next`  | Move to next file      |
| `gg`                     | `arrow top`   | Jump to top of list    |
| `G`                      | `arrow bot`   | Jump to bottom of list |
| `<C-u>` / `<S-PageUp>`   | `arrow -50%`  | Move up half page      |
| `<C-d>` / `<S-PageDown>` | `arrow 50%`   | Move down half page    |
| `<C-b>` / `<PageUp>`     | `arrow -100%` | Move up one page       |
| `<C-f>` / `<PageDown>`   | `arrow 100%`  | Move down one page     |

### Navigation - Horizontal

| Key             | Command   | Description            |
| --------------- | --------- | ---------------------- |
| `h` / `<Left>`  | `leave`   | Go to parent directory |
| `l` / `<Right>` | `enter`   | Enter child directory  |
| `H`             | `back`    | Go back in history     |
| `L`             | `forward` | Go forward in history  |

### Selection and Visual Mode

| Key       | Command                 | Description                    |
| --------- | ----------------------- | ------------------------------ |
| `<Space>` | `toggle`, `arrow 1`     | Toggle selection and move down |
| `<C-a>`   | `toggle_all --state=on` | Select all files               |
| `<C-r>`   | `toggle_all`            | Invert selection               |
| `v`       | `visual_mode`           | Enter visual mode (select)     |
| `V`       | `visual_mode --unset`   | Enter visual mode (unset)      |

### Preview

| Key     | Command   | Description                  |
| ------- | --------- | ---------------------------- |
| `J`     | `seek 5`  | Seek down 5 units in preview |
| `K`     | `seek -5` | Seek up 5 units in preview   |
| `<Tab>` | `spot`    | Toggle spot mode             |

### File Operations

| Key               | Command                      | Description                     |
| ----------------- | ---------------------------- | ------------------------------- |
| `o` / `<Enter>`   | `open`                       | Open selected files             |
| `O` / `<S-Enter>` | `open --interactive`         | Open interactively              |
| `y`               | `yank`                       | Yank (copy) selected files      |
| `x`               | `yank --cut`                 | Cut selected files              |
| `p`               | `paste`                      | Paste yanked files              |
| `P`               | `paste --force`              | Paste and overwrite             |
| `-`               | `link`                       | Create symbolic link (absolute) |
| `_`               | `link --relative`            | Create symbolic link (relative) |
| `<C-->`           | `hardlink`                   | Create hard link                |
| `Y` / `X`         | `unyank`                     | Cancel yank status              |
| `d`               | `remove`                     | Move to trash                   |
| `D`               | `remove --permanently`       | Delete permanently              |
| `a`               | `create`                     | Create file or directory        |
| `r`               | `rename --cursor=before_ext` | Rename file                     |

### Shell and Commands

| Key | Command                       | Description                  |
| --- | ----------------------------- | ---------------------------- |
| `;` | `shell --interactive`         | Run shell command            |
| `:` | `shell --block --interactive` | Run shell command (blocking) |
| `.` | `hidden toggle`               | Toggle hidden files          |

### Search and Filter

| Key     | Command                   | Description                 |
| ------- | ------------------------- | --------------------------- |
| `s`     | `search --via=fd`         | Search files by name (fd)   |
| `S`     | `search --via=rg`         | Search by content (ripgrep) |
| `<C-s>` | `escape --search`         | Cancel ongoing search       |
| `z`     | `plugin fzf`              | Jump with fzf               |
| `Z`     | `plugin zoxide`           | Jump with zoxide            |
| `f`     | `filter --smart`          | Filter files                |
| `/`     | `find --smart`            | Find next file              |
| `?`     | `find --previous --smart` | Find previous file          |
| `n`     | `find_arrow`              | Jump to next found          |
| `N`     | `find_arrow --previous`   | Jump to previous found      |

### Copy Path/Name

| Key  | Command                 | Description                 |
| ---- | ----------------------- | --------------------------- |
| `cc` | `copy path`             | Copy file path              |
| `cd` | `copy dirname`          | Copy directory path         |
| `cf` | `copy filename`         | Copy filename               |
| `cn` | `copy name_without_ext` | Copy name without extension |

### Linemode

| Key  | Command                | Description            |
| ---- | ---------------------- | ---------------------- |
| `ms` | `linemode size`        | Show file sizes        |
| `mp` | `linemode permissions` | Show permissions       |
| `mb` | `linemode btime`       | Show birth time        |
| `mm` | `linemode mtime`       | Show modification time |
| `mo` | `linemode owner`       | Show file owner        |
| `mn` | `linemode none`        | Hide extra info        |

### Sorting

| Key  | Command                           | Description                     |
| ---- | --------------------------------- | ------------------------------- |
| `,m` | `sort mtime --reverse=no`         | Sort by modified time           |
| `,M` | `sort mtime --reverse=yes`        | Sort by modified time (reverse) |
| `,b` | `sort btime --reverse=no`         | Sort by birth time              |
| `,B` | `sort btime --reverse=yes`        | Sort by birth time (reverse)    |
| `,e` | `sort extension --reverse=no`     | Sort by extension               |
| `,E` | `sort extension --reverse=yes`    | Sort by extension (reverse)     |
| `,a` | `sort alphabetical --reverse=no`  | Sort alphabetically             |
| `,A` | `sort alphabetical --reverse=yes` | Sort alphabetically (reverse)   |
| `,n` | `sort natural --reverse=no`       | Sort naturally                  |
| `,N` | `sort natural --reverse=yes`      | Sort naturally (reverse)        |
| `,s` | `sort size --reverse=no`          | Sort by size                    |
| `,S` | `sort size --reverse=yes`         | Sort by size (reverse)          |
| `,r` | `sort random --reverse=no`        | Sort randomly                   |

### Goto

| Key        | Command            | Description                |
| ---------- | ------------------ | -------------------------- |
| `gh`       | `cd ~`             | Go to home directory       |
| `gc`       | `cd ~/.config`     | Go to config directory     |
| `gd`       | `cd ~/Downloads`   | Go to Downloads            |
| `g<Space>` | `cd --interactive` | Interactive directory jump |
| `gf`       | `follow`           | Follow symlink             |

### Tabs

| Key  | Command                    | Description            |
| ---- | -------------------------- | ---------------------- |
| `tt` | `tab_create --current`     | Create tab in CWD      |
| `tr` | `tab_rename --interactive` | Rename current tab     |
| `1`  | `tab_switch 0`             | Switch to tab 1        |
| `2`  | `tab_switch 1`             | Switch to tab 2        |
| `3`  | `tab_switch 2`             | Switch to tab 3        |
| `4`  | `tab_switch 3`             | Switch to tab 4        |
| `5`  | `tab_switch 4`             | Switch to tab 5        |
| `6`  | `tab_switch 5`             | Switch to tab 6        |
| `7`  | `tab_switch 6`             | Switch to tab 7        |
| `8`  | `tab_switch 7`             | Switch to tab 8        |
| `9`  | `tab_switch 8`             | Switch to tab 9        |
| `[`  | `tab_switch -1 --relative` | Previous tab           |
| `]`  | `tab_switch 1 --relative`  | Next tab               |
| `{`  | `tab_swap -1`              | Swap with previous tab |
| `}`  | `tab_swap 1`               | Swap with next tab     |

### Tasks and Help

| Key          | Command      | Description       |
| ------------ | ------------ | ----------------- |
| `w`          | `tasks:show` | Show task manager |
| `~` / `<F1>` | `help`       | Open help         |

## Input Mode

Keybindings for text input (rename, create, shell, etc.).

### Mode Switching

| Key | Command                       | Description              |
| --- | ----------------------------- | ------------------------ |
| `i` | `insert`                      | Enter insert mode        |
| `I` | `move first-char`, `insert`   | Move to BOL and insert   |
| `a` | `insert --append`             | Enter append mode        |
| `A` | `move eol`, `insert --append` | Move to EOL and append   |
| `v` | `visual`                      | Enter visual mode        |
| `r` | `replace`                     | Replace single character |

### Navigation

| Key                         | Command                 | Description                  |
| --------------------------- | ----------------------- | ---------------------------- |
| `h` / `<Left>` / `<C-b>`    | `move -1`               | Move back one character      |
| `l` / `<Right>` / `<C-f>`   | `move 1`                | Move forward one character   |
| `b` / `<A-b>` / `<C-Left>`  | `backward`              | Move to start of word        |
| `w`                         | `forward`               | Move to start of next word   |
| `e` / `<A-f>` / `<C-Right>` | `forward --end-of-word` | Move to end of word          |
| `0` / `<C-a>` / `<Home>`    | `move bol`              | Move to beginning of line    |
| `$` / `<C-e>` / `<End>`     | `move eol`              | Move to end of line          |
| `^` / `_`                   | `move first-char`       | Move to first non-whitespace |

### Editing

| Key                       | Command             | Description                   |
| ------------------------- | ------------------- | ----------------------------- |
| `<Backspace>` / `<C-h>`   | `backspace`         | Delete previous character     |
| `<Delete>` / `<C-d>`      | `backspace --under` | Delete character under cursor |
| `<C-u>`                   | `kill bol`          | Kill to beginning of line     |
| `<C-k>`                   | `kill eol`          | Kill to end of line           |
| `<C-w>` / `<C-Backspace>` | `kill backward`     | Kill previous word            |
| `<A-d>` / `<C-Delete>`    | `kill forward`      | Kill next word                |

### Cut/Copy/Paste

| Key | Command                    | Description         |
| --- | -------------------------- | ------------------- |
| `d` | `delete --cut`             | Cut selection       |
| `D` | `delete --cut`, `move eol` | Cut to EOL          |
| `c` | `delete --cut --insert`    | Cut and insert      |
| `x` | `delete --cut`, `move 1`   | Cut character       |
| `y` | `yank`                     | Copy selection      |
| `p` | `paste`                    | Paste after cursor  |
| `P` | `paste --before`           | Paste before cursor |

### Undo/Redo

| Key     | Command                | Description                   |
| ------- | ---------------------- | ----------------------------- |
| `u`     | `undo`, `casefy lower` | Undo (or lowercase in visual) |
| `U`     | `casefy upper`         | Uppercase                     |
| `<C-r>` | `redo`                 | Redo                          |

### Submit/Cancel

| Key               | Command          | Description              |
| ----------------- | ---------------- | ------------------------ |
| `<Enter>`         | `close --submit` | Submit input             |
| `<C-c>`           | `close`          | Cancel input             |
| `<Esc>` / `<C-[>` | `escape`         | Back to normal or cancel |

## Tasks Manager

| Key                               | Command      | Description        |
| --------------------------------- | ------------ | ------------------ |
| `<Esc>` / `<C-[>` / `<C-c>` / `w` | `close`      | Close task manager |
| `k` / `<Up>`                      | `arrow prev` | Previous task      |
| `j` / `<Down>`                    | `arrow next` | Next task          |
| `<Enter>`                         | `inspect`    | Inspect task       |
| `x`                               | `cancel`     | Cancel task        |
| `~` / `<F1>`                      | `help`       | Open help          |

## Spot Mode

| Key                                   | Command      | Description        |
| ------------------------------------- | ------------ | ------------------ |
| `<Esc>` / `<C-[>` / `<C-c>` / `<Tab>` | `close`      | Close spot         |
| `k` / `<Up>`                          | `arrow prev` | Previous line      |
| `j` / `<Down>`                        | `arrow next` | Next line          |
| `h` / `<Left>`                        | `swipe prev` | Previous file      |
| `l` / `<Right>`                       | `swipe next` | Next file          |
| `cc`                                  | `copy cell`  | Copy selected cell |
| `~` / `<F1>`                          | `help`       | Open help          |

## Pick/Select Mode

| Key                         | Command          | Description      |
| --------------------------- | ---------------- | ---------------- |
| `<Esc>` / `<C-[>` / `<C-c>` | `close`          | Cancel pick      |
| `<Enter>`                   | `close --submit` | Submit selection |
| `k` / `<Up>`                | `arrow prev`     | Previous option  |
| `j` / `<Down>`              | `arrow next`     | Next option      |
| `~` / `<F1>`                | `help`           | Open help        |

## Confirm Dialog

| Key                               | Command          | Description     |
| --------------------------------- | ---------------- | --------------- |
| `<Esc>` / `<C-[>` / `<C-c>` / `n` | `close`          | Cancel          |
| `<Enter>` / `y`                   | `close --submit` | Confirm         |
| `k` / `<Up>`                      | `arrow prev`     | Previous option |
| `j` / `<Down>`                    | `arrow next`     | Next option     |
| `~` / `<F1>`                      | `help`           | Open help       |

## Completion Menu

| Key                          | Command                                  | Description         |
| ---------------------------- | ---------------------------------------- | ------------------- |
| `<C-c>`                      | `close`                                  | Cancel completion   |
| `<Tab>`                      | `close --submit`                         | Accept completion   |
| `<Enter>`                    | `close --submit`, `input:close --submit` | Complete and submit |
| `<A-k>` / `<Up>` / `<C-p>`   | `arrow prev`                             | Previous item       |
| `<A-j>` / `<Down>` / `<C-n>` | `arrow next`                             | Next item           |
| `~` / `<F1>`                 | `help`                                   | Open help           |

## Help Screen

| Key               | Command      | Description               |
| ----------------- | ------------ | ------------------------- |
| `<Esc>` / `<C-[>` | `escape`     | Clear filter or hide help |
| `<C-c>`           | `close`      | Close help                |
| `k` / `<Up>`      | `arrow prev` | Scroll up                 |
| `j` / `<Down>`    | `arrow next` | Scroll down               |
| `f`               | `filter`     | Filter help items         |

## Customization

To customize keybindings, create or edit `~/.config/yazi/keymap.toml`:

```toml theme={null}
# Example: Change navigation to arrow keys only
[mgr]
keymap = [
  { on = "<Up>",   run = "arrow prev", desc = "Move up" },
  { on = "<Down>", run = "arrow next", desc = "Move down" },
  # Add more custom bindings...
]
```

<Note>
  See the [Configuration](configuration/keymap) page for detailed information on customizing keybindings.
</Note>

## Source Reference

All default keybindings are defined in:

* **File**: `~/workspace/source/yazi-config/preset/keymap-default.toml`
* **Line reference**: Various sections throughout the file

The keybindings are processed by the Yazi core and can be overridden in your user configuration.
