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

keybinds.toml Reference

The keybinds configuration file maps keyboard shortcuts to actions.

Location

~/.two-face/keybinds.toml


Structure Overview

[[keybinds]]
key = "Enter"
action = "send"

[[keybinds]]
key = "Ctrl+Q"
action = "quit"

[[keybinds]]
key = "F1"
action = "send"
argument = "look"

Keybind Properties

Each [[keybinds]] entry defines one key mapping:

[[keybinds]]
# Required
key = "Ctrl+S"            # Key combination
action = "send"           # Action to perform

# Optional
argument = "save"         # Action argument
description = "Save game" # Description for help
context = "input"         # When this binding is active
PropertyTypeRequiredDescription
keystringyesKey combination
actionstringyesAction name
argumentstringnoAction argument
descriptionstringnoHelp text
contextstringnoActive context

Key Syntax

Basic Keys

key = "A"         # Letter A
key = "1"         # Number 1
key = "F1"        # Function key
key = "Enter"     # Enter key
key = "Space"     # Space bar
key = "Tab"       # Tab key
key = "Escape"    # Escape key

Modifier Keys

Combine modifiers with +:

key = "Ctrl+S"          # Ctrl + S
key = "Alt+F4"          # Alt + F4
key = "Shift+Tab"       # Shift + Tab
key = "Ctrl+Shift+Z"    # Ctrl + Shift + Z
key = "Ctrl+Alt+Delete" # Multiple modifiers

Available modifiers:

  • Ctrl - Control key
  • Alt - Alt key
  • Shift - Shift key

Special Keys

Key NameDescription
EnterEnter/Return
SpaceSpace bar
TabTab key
EscapeEscape key
BackspaceBackspace
DeleteDelete key
InsertInsert key
HomeHome key
EndEnd key
PageUpPage Up
PageDownPage Down
UpUp arrow
DownDown arrow
LeftLeft arrow
RightRight arrow
F1 - F12Function keys

Numpad Keys

key = "Numpad0"   # Numpad 0
key = "Numpad+"   # Numpad plus
key = "Numpad*"   # Numpad multiply
key = "NumpadEnter"  # Numpad enter

Actions

Input Actions

ActionArgumentDescription
sendcommandSend command to game
send_silentcommandSend without echo
inserttextInsert text at cursor
clear_input-Clear input field
history_prev-Previous command
history_next-Next command

Examples:

[[keybinds]]
key = "Enter"
action = "send"

[[keybinds]]
key = "F1"
action = "send"
argument = "attack"

[[keybinds]]
key = "Ctrl+K"
action = "clear_input"
ActionArgumentDescription
scroll_uplinesScroll up
scroll_downlinesScroll down
scroll_page_up-Page up
scroll_page_down-Page down
scroll_top-Jump to top
scroll_bottom-Jump to bottom
focus_next-Focus next window
focus_prev-Focus previous window
focus_windownameFocus specific window

Examples:

[[keybinds]]
key = "PageUp"
action = "scroll_page_up"

[[keybinds]]
key = "Ctrl+Tab"
action = "focus_next"

[[keybinds]]
key = "Ctrl+1"
action = "focus_window"
argument = "main"
ActionArgumentDescription
open_menu-Open main menu
open_highlight_browser-Open highlight editor
open_keybind_browser-Open keybind editor
open_color_browser-Open color editor
open_window_editor-Open window editor
close_popup-Close current popup

Examples:

[[keybinds]]
key = "Ctrl+M"
action = "open_menu"

[[keybinds]]
key = "Ctrl+H"
action = "open_highlight_browser"

[[keybinds]]
key = "Escape"
action = "close_popup"

Client Actions

ActionArgumentDescription
quit-Exit Two-Face
reload_config-Reload configuration
clear_windownameClear window content
toggle_links-Toggle clickable links
toggle_bordernameToggle window border
copy-Copy selection
paste-Paste clipboard

Examples:

[[keybinds]]
key = "Ctrl+Q"
action = "quit"

[[keybinds]]
key = "F5"
action = "reload_config"

[[keybinds]]
key = "Ctrl+L"
action = "clear_window"
argument = "main"

Game Actions

ActionArgumentDescription
movedirectionMove in direction
look-Look around
inventory-Check inventory

Examples:

[[keybinds]]
key = "Numpad8"
action = "move"
argument = "north"

[[keybinds]]
key = "Numpad2"
action = "move"
argument = "south"

Contexts

Keybinds can be limited to specific contexts:

ContextActive When
globalAlways (default)
inputInput field focused
menuMenu/popup open
browserBrowser popup open
editorEditor popup open

Examples:

# Only active when input is focused
[[keybinds]]
key = "Tab"
action = "autocomplete"
context = "input"

# Only active in menus
[[keybinds]]
key = "Enter"
action = "select"
context = "menu"

Default Keybinds

Two-Face ships with these defaults:

[[keybinds]]
key = "PageUp"
action = "scroll_page_up"

[[keybinds]]
key = "PageDown"
action = "scroll_page_down"

[[keybinds]]
key = "Home"
action = "scroll_top"

[[keybinds]]
key = "End"
action = "scroll_bottom"

[[keybinds]]
key = "Ctrl+Tab"
action = "focus_next"

Input

[[keybinds]]
key = "Enter"
action = "send"

[[keybinds]]
key = "Up"
action = "history_prev"

[[keybinds]]
key = "Down"
action = "history_next"

[[keybinds]]
key = "Ctrl+C"
action = "copy"

[[keybinds]]
key = "Ctrl+V"
action = "paste"
[[keybinds]]
key = "Ctrl+M"
action = "open_menu"

[[keybinds]]
key = "Ctrl+H"
action = "open_highlight_browser"

[[keybinds]]
key = "Ctrl+K"
action = "open_keybind_browser"

[[keybinds]]
key = "Ctrl+E"
action = "open_window_editor"

[[keybinds]]
key = "Escape"
action = "close_popup"

Client

[[keybinds]]
key = "Ctrl+Q"
action = "quit"

[[keybinds]]
key = "F5"
action = "reload_config"

[[keybinds]]
key = "Ctrl+L"
action = "clear_window"
argument = "main"

Example Configurations

Numpad Movement

[[keybinds]]
key = "Numpad8"
action = "send"
argument = "north"
description = "Move north"

[[keybinds]]
key = "Numpad2"
action = "send"
argument = "south"

[[keybinds]]
key = "Numpad4"
action = "send"
argument = "west"

[[keybinds]]
key = "Numpad6"
action = "send"
argument = "east"

[[keybinds]]
key = "Numpad7"
action = "send"
argument = "northwest"

[[keybinds]]
key = "Numpad9"
action = "send"
argument = "northeast"

[[keybinds]]
key = "Numpad1"
action = "send"
argument = "southwest"

[[keybinds]]
key = "Numpad3"
action = "send"
argument = "southeast"

[[keybinds]]
key = "Numpad5"
action = "send"
argument = "out"

Combat Macros

[[keybinds]]
key = "F1"
action = "send"
argument = "attack"
description = "Basic attack"

[[keybinds]]
key = "F2"
action = "send"
argument = "incant 101"
description = "Cast Spirit Warding I"

[[keybinds]]
key = "F3"
action = "send"
argument = "stance defensive"
description = "Defensive stance"

See Also