LatentCodeCustomize
Keybindings
Every TUI shortcut, its default keys, and how to change them.
The leader key
Most shortcuts start with the leader key, ctrl+x. Press it, let go, then press the next key within two seconds: ctrl+x n starts a new session. In the tables below, those are shown as ctrl+x followed by the key.
ctrl+p opens the command palette, which lists every action with its current shortcut. It's the quickest way to find something.
Change a shortcut
Set keybindings in tui.json (not latentcode.json), globally in ~/.config/latentcode/tui.json or per project. Use the names from the tables below.
{
"$schema": "https://latentstack.dev/tui.json",
"keybinds": {
"leader": "ctrl+a",
"session_new": "<leader>n,ctrl+n",
"input_newline": "shift+return,ctrl+j",
"messages_toggle_conceal": "none"
},
"leader_timeout": 3000
}- Separate alternatives with commas. Each one works.
- Write
<leader>to use the leader key, whatever you've set it to. - Set a binding to
"none"(orfalse) to turn it off. - Write keys the way the defaults below do, for example
ctrl+shift+a,alt+returnorpagedown.enter,esc,pgupandpgdownare accepted as other names forreturn,escape,pageupandpagedown. leader_timeoutis how long, in milliseconds, LatentCode waits for the key after the leader. Default 2000.- Unknown names are ignored with a warning in the log.
Defaults
Some keys mean different things in different places. ctrl+d, for example, quits from an empty prompt, deletes a character while you type, and deletes the selected session in the session list.
General
| Name | Default | Action |
|---|---|---|
| app_exit | ctrl+cctrl+dctrl+xq | Exit the application |
| app_toggle_animations | none | Toggle animations |
| app_toggle_file_context | none | Toggle file context |
| app_toggle_diffwrap | none | Toggle diff wrapping |
| app_toggle_paste_summary | none | Toggle paste summary |
| app_toggle_session_directory_filter | none | Toggle session directory filtering |
| command_list | ctrl+p | List available commands |
| help_show | none | Open help dialog |
| docs_open | none | Open documentation |
| editor_open | ctrl+xe | Open external editor |
| theme_list | ctrl+xt | List available themes |
| theme_switch_mode | none | Switch between light and dark theme mode |
| theme_mode_lock | none | Lock or unlock theme mode |
| sidebar_toggle | ctrl+xb | Toggle sidebar |
| scrollbar_toggle | none | Toggle session scrollbar |
| status_view | ctrl+xs | View status |
| terminal_suspend | ctrl+z | Suspend terminal |
| terminal_title_toggle | none | Toggle terminal title |
| plugin_manager | none | Open plugin manager dialog |
| plugin_install | none | Install plugin |
Sessions
escape interrupts the agent only when pressed twice: the prompt shows esc again to interrupt after the first press. session_rename, session_delete and session_pin_toggle act in the session list.
| Name | Default | Action |
|---|---|---|
| session_export | ctrl+xx | Export session to editor |
| session_copy | none | Copy session transcript |
| session_new | ctrl+xn | Create a new session |
| session_list | ctrl+xl | List all sessions |
| session_timeline | ctrl+xg | Show session timeline |
| session_fork | none | Fork session from message |
| session_rename | ctrl+r | Rename session |
| session_delete | ctrl+d | Delete session |
| session_interrupt | escape | Interrupt current session |
| loop_stop | escape | Stop the active loop while waiting |
| session_background | ctrl+b | Background synchronous subagents |
| session_compact | ctrl+xc | Compact the session |
| session_toggle_timestamps | none | Toggle message timestamps |
| session_toggle_generic_tool_output | none | Toggle generic tool output |
| session_child_first | ctrl+xdown | Go to first child session |
| session_child_cycle | right | Go to next child session |
| session_child_cycle_reverse | left | Go to previous child session |
| session_parent | up | Go to parent session |
| session_pin_toggle | ctrl+f | Pin or unpin session in the session list |
| session_quick_switch_1 | ctrl+x1 | Switch to session in quick slot 1 |
| session_quick_switch_2 | ctrl+x2 | Switch to session in quick slot 2 |
| session_quick_switch_3 | ctrl+x3 | Switch to session in quick slot 3 |
| session_quick_switch_4 | ctrl+x4 | Switch to session in quick slot 4 |
| session_quick_switch_5 | ctrl+x5 | Switch to session in quick slot 5 |
| session_quick_switch_6 | ctrl+x6 | Switch to session in quick slot 6 |
| session_quick_switch_7 | ctrl+x7 | Switch to session in quick slot 7 |
| session_quick_switch_8 | ctrl+x8 | Switch to session in quick slot 8 |
| session_quick_switch_9 | ctrl+x9 | Switch to session in quick slot 9 |
Models and agents
| Name | Default | Action |
|---|---|---|
| model_favorite_toggle | ctrl+f | Toggle model favorite status |
| model_list | ctrl+xm | List available models |
| model_cycle_recent | f2 | Next recently used model |
| model_cycle_recent_reverse | shift+f2 | Previous recently used model |
| model_cycle_favorite | none | Next favorite model |
| model_cycle_favorite_reverse | none | Previous favorite model |
| mcp_list | none | List MCP servers |
| provider_connect | none | Connect provider |
| agent_list | ctrl+xa | List agents |
| agent_cycle | tab | Next agent |
| agent_cycle_reverse | shift+tab | Previous agent |
| variant_cycle | ctrl+t | Cycle reasoning effort |
| variant_list | none | List reasoning effort levels |
Conversation
| Name | Default | Action |
|---|---|---|
| messages_page_up | pageupctrl+alt+b | Scroll messages up by one page |
| messages_page_down | pagedownctrl+alt+f | Scroll messages down by one page |
| messages_line_up | ctrl+alt+y | Scroll messages up by one line |
| messages_line_down | ctrl+alt+e | Scroll messages down by one line |
| messages_half_page_up | ctrl+alt+u | Scroll messages up by half page |
| messages_half_page_down | ctrl+alt+d | Scroll messages down by half page |
| messages_first | ctrl+ghome | Navigate to first message |
| messages_last | ctrl+alt+gend | Navigate to last message |
| messages_next | none | Navigate to next message |
| messages_previous | none | Navigate to previous message |
| messages_last_user | none | Navigate to last user message |
| messages_copy | ctrl+xy | Copy message |
| messages_undo | ctrl+xu | Undo message |
| messages_redo | ctrl+xr | Redo message |
| messages_toggle_conceal | ctrl+xh | Toggle code block concealment in messages |
| tool_details | none | Toggle tool details visibility |
| display_thinking | none | Toggle thinking blocks visibility |
| display_detail | ctrl+l | Expand or collapse reasoning, summaries and tool activity |
Prompt and text editing
| Name | Default | Action |
|---|---|---|
| stash_delete | ctrl+d | Delete stash entry |
| prompt_submit | none | Submit prompt |
| prompt_editor_context_clear | none | Clear editor context |
| prompt_skills | none | Open skill selector |
| prompt_stash | none | Stash prompt |
| prompt_stash_pop | none | Pop stashed prompt |
| prompt_stash_list | none | List stashed prompts |
| prompt_paste_preview | ctrl+o | Preview pasted content |
| input_clear | ctrl+c | Clear input field |
| input_paste | ctrl+v | Paste from clipboard |
| input_submit | return | Submit input |
| input_newline | shift+returnctrl+returnalt+returnctrl+j | Insert newline in input |
| input_move_left | leftctrl+b | Move cursor left in input |
| input_move_right | rightctrl+f | Move cursor right in input |
| input_move_up | up | Move cursor up in input |
| input_move_down | down | Move cursor down in input |
| input_select_left | shift+left | Select left in input |
| input_select_right | shift+right | Select right in input |
| input_select_up | shift+up | Select up in input |
| input_select_down | shift+down | Select down in input |
| input_line_home | ctrl+a | Move to start of line in input |
| input_line_end | ctrl+e | Move to end of line in input |
| input_select_line_home | ctrl+shift+a | Select to start of line in input |
| input_select_line_end | ctrl+shift+e | Select to end of line in input |
| input_visual_line_home | alt+a | Move to start of visual line in input |
| input_visual_line_end | alt+e | Move to end of visual line in input |
| input_select_visual_line_home | alt+shift+a | Select to start of visual line in input |
| input_select_visual_line_end | alt+shift+e | Select to end of visual line in input |
| input_buffer_home | home | Move to start of buffer in input |
| input_buffer_end | end | Move to end of buffer in input |
| input_select_buffer_home | shift+home | Select to start of buffer in input |
| input_select_buffer_end | shift+end | Select to end of buffer in input |
| input_delete_line | ctrl+shift+d | Delete line in input |
| input_delete_to_line_end | ctrl+k | Delete to end of line in input |
| input_delete_to_line_start | ctrl+u | Delete to start of line in input |
| input_backspace | backspaceshift+backspace | Backspace in input |
| input_delete | ctrl+ddeleteshift+delete | Delete character in input |
| input_undo | ctrl+-super+z | Undo in input |
| input_redo | ctrl+.super+shift+z | Redo in input |
| input_word_forward | alt+falt+rightctrl+right | Move word forward in input |
| input_word_backward | alt+balt+leftctrl+left | Move word backward in input |
| input_select_word_forward | alt+shift+falt+shift+right | Select word forward in input |
| input_select_word_backward | alt+shift+balt+shift+left | Select word backward in input |
| input_delete_word_forward | alt+dalt+deletectrl+delete | Delete word forward in input |
| input_delete_word_backward | ctrl+wctrl+backspacealt+backspace | Delete word backward in input |
| input_select_all | super+a | Select all in input |
| history_previous | up | Previous history item |
| history_next | down | Next history item |
Lists, autocomplete and dialogs
| Name | Default | Action |
|---|---|---|
| dialog.select.prev | upctrl+p | Move to previous dialog item |
| dialog.select.next | downctrl+n | Move to next dialog item |
| dialog.select.page_up | pageup | Move up one page in dialog |
| dialog.select.page_down | pagedown | Move down one page in dialog |
| dialog.select.home | home | Move to first dialog item |
| dialog.select.end | end | Move to last dialog item |
| dialog.select.submit | return | Submit selected dialog item |
| dialog.prompt.submit | return | Submit dialog prompt |
| dialog.mcp.toggle | space | Toggle MCP in MCP dialog |
| prompt.autocomplete.prev | upctrl+p | Move to previous autocomplete item |
| prompt.autocomplete.next | downctrl+n | Move to next autocomplete item |
| prompt.autocomplete.hide | escape | Hide autocomplete |
| prompt.autocomplete.select | return | Select autocomplete item |
| prompt.autocomplete.complete | tab | Complete autocomplete item |
| permission.prompt.fullscreen | ctrl+f | Toggle permission prompt fullscreen |
| plugins.toggle | space | Toggle plugin |
| dialog.plugins.install | shift+i | Install plugin from plugin dialog |
Diff viewer
These apply inside the diff viewer (/diff). It also uses fixed keys you can't change: j/down and k/up to move, pagedown/ctrl+f and pageup/ctrl+b to page, and m to mark a file reviewed.
| Name | Default | Action |
|---|---|---|
| diff_close | escapeq | Close diff viewer |
| diff_toggle | enterspace | Toggle diff viewer item |
| diff_expand | right | Expand diff viewer item |
| diff_expand_all | E | Expand all diff viewer folders |
| diff_collapse | left | Collapse diff viewer item |
| diff_switch_focus | tab | Switch diff viewer focus |
| diff_next_hunk | ] | Jump to next diff hunk |
| diff_previous_hunk | [ | Jump to previous diff hunk |
| diff_next_file | n | Jump to next diff file |
| diff_previous_file | p | Jump to previous diff file |
| diff_toggle_file_tree | b | Toggle diff viewer file tree |
| diff_single_patch | s | Toggle single patch view |
| diff_switch_source | d | Switch diff viewer source |
| diff_toggle_view | v | Toggle diff viewer split or unified view |
| diff_help | ? | Show more diff viewer shortcuts |
Windows
On Windows, terminal_suspend is turned off and ctrl+z is added to input_undo, unless you set those yourself.
See also The TUI for what each part of the screen does.