Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/termux/termux-app/llms.txt

Use this file to discover all available pages before exploring further.

The extra keys toolbar sits between the terminal and the soft keyboard, providing one-tap access to keys that are awkward or impossible to type on a touchscreen — like ESC, CTRL, ALT, and arrow keys. You configure it through the extra-keys property in ~/.termux/termux.properties. Each change takes effect after reloading settings.

Default configuration

Out of the box, Termux shows a two-row toolbar:
extra-keys=[['ESC','/',{key: '-', popup: '|'},'HOME','UP','END','PGUP'], \
            ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]
This produces:
  • Row 1: ESC / - (long-press for |) HOME END PGUP
  • Row 2: TAB CTRL ALT PGDN

Syntax

The extra-keys value is a JSON array of rows. Each row is an array of keys. Keys can be either a plain string or an object.
extra-keys = [ [row1_key1, row1_key2, ...], [row2_key1, ...], ... ]

Plain string key

The simplest form — just the key name as a string:
extra-keys=[['ESC', 'TAB', 'CTRL', 'ALT']]

Object key

Use an object to set a popup key, a macro sequence, or a custom display label:
# Key with a popup triggered by long-press or swipe up
{key: 'KEY_NAME', popup: 'POPUP_KEY_NAME'}

# Macro: sends a sequence of keys on press
{macro: 'CTRL f d', display: 'tmux exit'}

# Custom display label
{key: 'ENTER', display: '↵'}
Object syntax inside termux.properties does not need outer quotes for the key names. Both {key: ESC} and {key: 'ESC'} are valid.

Named keys

These key names are recognized in the extra-keys configuration. Names are case-insensitive and several aliases are accepted.
NameAlias(es)Description
UPUp arrow
DOWNDNDown arrow
LEFTLTLeft arrow
RIGHTRTRight arrow
HOMEHome key
ENDEnd key
PGUPPAGEUP, PAGE_UP, PAGE-UP, PAGE UPPage up
PGDNPAGEDOWN, PAGE_DOWN, PAGE-DOWNPage down
INSInsert
DELDELETEForward delete
BKSPBACKSPACEBackspace

Control and function keys

NameAlias(es)Description
ESCESCAPEEscape
TABTab
CTRLCONTROLControl modifier
ALTAlt modifier
SHIFTSHFTShift modifier
FNFUNCTIONFunction modifier
ENTERRETURNEnter/Return
SPACESpace bar
F1F12Function keys

Special buttons

NameDescription
KEYBOARDToggle the soft keyboard
DRAWEROpen the sessions drawer
PASTEPaste from clipboard
SCROLLScroll lock toggle

Character aliases

AliasActual character
BACKSLASH\
QUOTE"
APOSTROPHE'
Any string not in the named key tables is sent as literal text to the terminal.

Examples

A minimal toolbar with the most-used keys on a single row:
extra-keys=[[ESC, TAB, CTRL, ALT, {key: '-', popup: '|'}, DOWN, UP]]

A popup is a secondary action triggered by a long-press or swipe-up on a button. Define it with the popup field on an object key:
# Simple popup: press for '-', long-press for '|'
{key: '-', popup: '|'}

# Popup with a macro and custom label
{key: 'CTRL', popup: {macro: 'CTRL ALT t', display: 'new term'}}
Popup values follow the same syntax as regular keys — they can be a named key string, a literal character, or an object with macro and display.

Macros

A macro sends a sequence of space-separated key names as a single button press. Use the macro field in place of key:
{macro: 'CTRL f d', display: 'tmux exit'}
Each token in the macro string is a named key or a literal character. For example, CTRL f d sends Ctrl, then f, then d — which is the tmux prefix (Ctrl+F) followed by d to detach.

Custom display labels

The display field overrides the button label with any text you choose:
{key: 'PGUP', display: '⇑'}
{macro: 'CTRL c', display: 'INT'}
Without a display value, labels are drawn from the active extra-keys-style display map.

extra-keys-style

The extra-keys-style property controls which Unicode symbols replace key names as button labels. It applies to all buttons that do not have an explicit display value.
extra-keys-style=default
ValueDescription
defaultArrow keys show ←↑↓→; ENTER, TAB, BKSP, DEL; -
arrows-onlyOnly the four arrow keys use Unicode glyphs; -
arrows-allArrows + navigation (HOME, END, PGUP, PGDN) + arrows-only glyphs
allAll available ISO symbols including CTRL, ALT, ESC
noneEvery key is displayed as plain text

Capitalization

By default all button labels are uppercased automatically (extra-keys-text-all-caps=true). To preserve mixed-case custom labels, set:
extra-keys-text-all-caps=false
Use extra-keys-text-all-caps=false together with display values when you want lowercase shorthand labels like a-j or C-c.

Build docs developers (and LLMs) love