vmux
AppsvmuxKeyboardExtension

Layout and keys

Reference for every key on vmuxKeyboardExtension and the byte sequence it sends to the active field or remote shell.

Layout at a glance

The keyboard is laid out as seven rows that mirror a 2021 MacBook Pro US ANSI keyboard:

Row 1 (function)   esc  F1  F2  F3  F4  F5  F6  F7  F8  F9  F10 F11 F12
Row 2 (number)     `    1   2   3   4   5   6   7   8   9   0   -   =   <-
Row 3 (qwerty)     tab  q   w   e   r   t   y   u   i   o   p   [   ]   \
Row 4 (home)       caps a   s   d   f   g   h   j   k   l   ;   '   return
Row 5 (shift)      shift z   x   c   v   b   n   m   ,   .   /   up  shift
Row 6 (bottom)     globe fn  ctrl opt cmd  ----space----  cmd  opt left dn  right

The number row, function row, and arrow keys are always visible. There is no Fn-toggle layer hiding the F-keys, and there is no 123 layer hiding the symbols. Brackets, pipe, tilde, slash, dash, and backtick are all primary keys.

In landscape on iPhone, the keyboard automatically shrinks its row height (about 268 pt instead of 372 pt) so it does not eat half your screen.

Modifiers and how they combine

Five modifiers live on the keyboard, plus CapsLock:

ModifierKeyBehavior
Shiftshift (left and right)Sticky one-shot. Next character is shifted, then disarms.
CapsLockcapsPersistent toggle. Stays on until you tap it again. Affects letter case only.
CtrlctrlSticky one-shot. Next letter is sent as the corresponding control byte (Ctrl+A = 0x01, Ctrl+C = 0x03, etc).
Option / Altopt (left and right)Sticky one-shot. Next character is prefixed with ESC, the standard Meta convention.
Cmdcmd (left and right)Sticky one-shot. Used for app-level shortcuts in apps that recognize them.
FnfnSticky one-shot. Reserved for future layered keys; currently informational.

A modifier turns visibly armed when you tap it and disarms after the next non-modifier keypress. CapsLock is the exception — it stays armed across multiple keys until tapped again. You can combine multiple modifiers (Ctrl + Shift, Ctrl + Alt + a letter, and so on) by tapping each one before the regular key.

Shift respects letter case. If CapsLock is on and you tap Shift, the result is lower case for that one keystroke — the same XOR rule a hardware keyboard uses.

What each key sends

Plain typing keys send the obvious character — q sends q, Shift + 1 sends !. The terminal-relevant special keys send the standard xterm-compatible escape sequences below. You should not need to memorize these; they are the same sequences your shell, vim, tmux, and ssh already understand.

Function row

KeyDefaultWith Ctrl, Alt, or Shift
EscESC (0x1B)Alt+Esc sends ESC ESC
F1ESC O Pxterm CSI form: ESC [ 1 ; mod P
F2ESC O QESC [ 1 ; mod Q
F3ESC O RESC [ 1 ; mod R
F4ESC O SESC [ 1 ; mod S
F5ESC [ 15 ~ESC [ 15 ; mod ~
F6ESC [ 17 ~ESC [ 17 ; mod ~
F7ESC [ 18 ~ESC [ 18 ; mod ~
F8ESC [ 19 ~ESC [ 19 ; mod ~
F9ESC [ 20 ~ESC [ 20 ; mod ~
F10ESC [ 21 ~ESC [ 21 ; mod ~
F11ESC [ 23 ~ESC [ 23 ; mod ~
F12ESC [ 24 ~ESC [ 24 ; mod ~

The xterm mod value is 1 for plain, 2 for Shift, 3 for Alt, 5 for Ctrl, and additive for combinations.

Editing keys

KeyDefaultNotable variants
TabTAB (0x09)Shift+Tab sends ESC [ Z (back-tab)
ReturnCR (0x0D)Shift+Return sends LF (0x0A); Ctrl+Return preserves CR
BackspaceDEL (0x7F)Ctrl+Backspace sends BS (0x08); Alt+Backspace sends ESC DEL
CapsLock(no output)Toggles letter shift state

Arrow cluster

KeyDefaultApplication cursor mode
UpESC [ AESC O A
DownESC [ BESC O B
RightESC [ CESC O C
LeftESC [ DESC O D

Plain Alt + Left sends ESC b (backward word) and Alt + Right sends ESC f (forward word) — the readline word-jump shortcuts.

Modified arrows use the xterm CSI-with-modifier form, e.g. Shift + Up = ESC [ 1 ; 2 A, Ctrl + Up = ESC [ 1 ; 5 A, etc. This is the same encoding modern terminals expect, so vim, less, and tmux all see the modifier.

Punctuation and symbols (US ANSI)

KeyPlainShifted
`grave (`)tilde (~)
10digits! @ # $ % ^ & * ( )
-hyphenunderscore
=equalsplus
[ ]brackets{ }
\backslashpipe
;semicoloncolon
'apostrophedouble quote
, . /comma, period, slash< > ?

All of these are primary keys — no 123 symbol layer.

Bottom row

KeyWhat it does
Globe (next keyboard)Single tap cycles to the next keyboard. Long-press shows the picker. The globe key only appears if you have more than one keyboard installed; iOS hides it otherwise.
FnSticky modifier (currently informational).
CtrlSticky modifier — see Ctrl + letter table below.
OptionSticky Meta.
CmdSticky modifier for app shortcuts.
SpacebarInserts a single space on tap. Long-press and drag to enter trackpad mode.

Ctrl + letter quick reference

These are the most-used control bytes and what they map to on a typical Unix shell:

ChordByteCommon meaning
Ctrl + A0x01Beginning of line (readline)
Ctrl + C0x03Interrupt (SIGINT)
Ctrl + D0x04EOF / logout
Ctrl + E0x05End of line (readline)
Ctrl + K0x0BKill to end of line
Ctrl + L0x0CClear screen
Ctrl + R0x12Reverse search history
Ctrl + U0x15Kill to start of line
Ctrl + W0x17Kill word
Ctrl + Z0x1ASuspend (SIGTSTP)
Ctrl + \0x1CQuit (SIGQUIT)
Ctrl + Space0x00NUL

Any letter A–Z plus Space and certain punctuation (@, [, \, ], ^, _) accept Ctrl. The general rule is the ASCII code with bits 0x60 cleared.

Layout legends

Each key shows two legends: the primary character (centered) and the shifted variant (smaller, top-right corner). The legends update live as you arm and disarm Shift or CapsLock — Shift on with no CapsLock shows uppercase letters and the shifted symbols, CapsLock on shows uppercase letters but unchanged symbol legends.

The keys use JetBrains Mono Nerd Font for the labels, so glyphs match the typeface most vmux themes ship with.

See also