Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Keybind Actions

Two-Face supports extensive keyboard customization. This guide covers all available keybind actions.

Keybind Basics

Keybinds are defined in keybinds.toml:

[keybinds."ctrl+l"]
action = "layout_editor"

[keybinds."f1"]
action = "help"

[keybinds."ctrl+1"]
macro = "attack target"

Key Format

Modifiers

ModifierFormat
Controlctrl+
Altalt+
Shiftshift+
Meta/Supermeta+

Special Keys

KeyFormat
F1-F12f1 to f12
Enterenter
Escapeescape
Tabtab
Backspacebackspace
Deletedelete
Insertinsert
Homehome
Endend
Page Uppageup
Page Downpagedown
Arrowsup, down, left, right
Spacespace

Combination Examples

"ctrl+s"         # Ctrl + S
"ctrl+shift+s"   # Ctrl + Shift + S
"alt+f4"         # Alt + F4
"f1"             # F1 alone
"shift+tab"      # Shift + Tab

Action Categories

ActionDescription
scroll_upScroll window up
scroll_downScroll window down
page_upPage up
page_downPage down
scroll_topJump to top
scroll_bottomJump to bottom
focus_nextFocus next window
focus_prevFocus previous window
focus_mainFocus main window
focus_inputFocus command input

Window Actions

ActionDescription
layout_editorOpen layout editor
window_editorOpen window editor
toggle_borderToggle window border
toggle_titleToggle window title
maximize_windowMaximize current window
restore_windowRestore window size
close_windowClose current popup

Editor Actions

ActionDescription
highlight_browserOpen highlight browser
keybind_browserOpen keybind browser
color_browserOpen color browser
theme_browserOpen theme browser
settings_editorOpen settings

Input Actions

ActionDescription
history_prevPrevious command history
history_nextNext command history
clear_inputClear command input
submit_commandSubmit current command
cancelCancel current operation

Text Actions

ActionDescription
select_allSelect all text
copyCopy selection
cutCut selection
pastePaste clipboard
searchOpen search
search_nextFind next
search_prevFind previous

Tab Actions

ActionDescription
next_tabNext tab
prev_tabPrevious tab
tab_1 to tab_9Jump to tab by number
close_tabClose current tab

Application Actions

ActionDescription
quitExit application
helpShow help
reload_configReload all config
reload_colorsReload colors
reload_highlightsReload highlights
reload_keybindsReload keybinds
reload_layoutReload layout

Game Actions

ActionDescription
reconnectReconnect to server
disconnectDisconnect

Macros

Send game commands:

[keybinds."ctrl+1"]
macro = "attack target"

[keybinds."ctrl+2"]
macro = "stance defensive"

[keybinds."ctrl+h"]
macro = "hide"

Multi-Command Macros

Separate with semicolons:

[keybinds."f5"]
macro = "stance offensive;attack target"

Macro with Variables

Use $input for prompted input:

[keybinds."ctrl+g"]
macro = "go $input"
# Prompts for input, then sends "go <input>"

Default Keybinds

Global

KeyAction
EscapeCancel/close popup
Ctrl+CCopy
Ctrl+VPaste
Ctrl+XCut
Ctrl+ASelect all
KeyAction
Page UpScroll up
Page DownScroll down
HomeScroll to top
EndScroll to bottom
TabFocus next
Shift+TabFocus prev

Command Input

KeyAction
EnterSubmit command
UpHistory prev
DownHistory next
Ctrl+LClear input

Browsers

KeyAction
Up/kNavigate up
Down/jNavigate down
EnterSelect
DeleteDelete item
EscapeClose

Context-Specific Keybinds

Some keybinds only work in specific contexts:

# Only in Normal mode
[keybinds."ctrl+l"]
action = "layout_editor"
mode = "normal"

# Only in Navigation mode
[keybinds."j"]
action = "scroll_down"
mode = "navigation"

Priority Layers

Keybinds are processed in order:

  1. Global keybinds - Always active
  2. Menu keybinds - In popup/editor
  3. User keybinds - Game mode
  4. Default input - Character insertion

Examples

Combat Setup

# Quick attacks
[keybinds."f1"]
macro = "attack target"

[keybinds."f2"]
macro = "stance offensive;attack target"

[keybinds."f3"]
macro = "stance defensive"

[keybinds."f4"]
macro = "hide"

# Movement
[keybinds."numpad8"]
macro = "go north"

[keybinds."numpad2"]
macro = "go south"

[keybinds."numpad4"]
macro = "go west"

[keybinds."numpad6"]
macro = "go east"

Spellcasting

[keybinds."ctrl+1"]
macro = "prep 101;cast"

[keybinds."ctrl+2"]
macro = "prep 103;cast"

[keybinds."ctrl+3"]
macro = "prep 107;cast target"
[keybinds."ctrl+shift+up"]
action = "scroll_top"

[keybinds."ctrl+shift+down"]
action = "scroll_bottom"

[keybinds."alt+1"]
action = "focus_main"

[keybinds."alt+2"]
macro = ".focus combat"

Quick Commands

[keybinds."ctrl+l"]
macro = "look"

[keybinds."ctrl+i"]
macro = "inventory"

[keybinds."ctrl+e"]
macro = "experience"

[keybinds."ctrl+w"]
macro = "wealth"

Using the Keybind Browser

.keybinds

Features:

  • Browse all keybinds
  • Add new keybinds
  • Edit existing keybinds
  • Delete keybinds
  • Filter by type

Conflict Resolution

If two keybinds use the same key:

  1. Higher priority wins
  2. Later definition overwrites earlier
  3. Context-specific beats general

Check for conflicts:

.keybinds

Look for duplicate key combos.

Troubleshooting

Keybind Not Working

  1. Check for conflicts
  2. Verify key format is correct
  3. Check context/mode setting
  4. Reload: .reload keybinds

Key Not Detected

Some keys may not be captured:

  • System shortcuts (Alt+Tab, etc.)
  • Terminal shortcuts
  • Media keys

Modifier Issues

Some terminals don’t report all modifiers:

  • Try different modifier combos
  • Use function keys (F1-F12) as alternatives

See Also