SSH on an iPad with an external keyboard has three problem keys: Esc, which many iPad keyboards lack; Ctrl, best moved to Caps Lock; and F1–F12, missing on many compact layouts. Cmd does not replace Ctrl: iPadOS reserves it for system and app shortcuts, so it never reaches the server.

Esc on the iPad: how to send it over SSH without a physical key

Ctrl+[ sends exactly the same byte as Esc (ASCII 27, shown by the terminal as ^[), so vim, less, tmux and bash vi mode cannot tell the two apart. It is the universal fix: it works in any SSH client and on any keyboard with Ctrl and a bracket key.

If that chord feels awkward, there are three alternatives:

  1. Remap Caps Lock to Escape in Settings > General > Keyboard > Hardware Keyboard > Modifier Keys. The change applies system-wide, not just in the terminal.
  2. Add a vim mapping such as inoremap jk <Esc> to ~/.vimrc so you can leave insert mode without reaching for any key.
  3. Use the on-screen Esc key in your client. termi1 ships its own keyboard with Esc, Ctrl, Tab and arrows, exactly the keys the system keyboard hides.

Esc also acts as Meta in readline: Esc followed by b moves back one word and Esc followed by f moves forward one. That helps when Option types special characters instead of behaving like Alt.

Ctrl on iPad keyboards: why it belongs on Caps Lock

Ctrl is the busiest key in an SSH session: Ctrl+C interrupts, Ctrl+D ends input, Ctrl+R searches history, Ctrl+A and Ctrl+E jump to the start and end of the line, and Ctrl+Z suspends the foreground job. On compact keyboards it usually sits in a corner, far from the home row.

The same Modifier Keys menu lets you assign Control to Caps Lock. Since Caps Lock can only take one role, you have to choose: Ctrl on Caps Lock plus Esc via Ctrl+[ is the most comfortable setup for vim and tmux, because both actions stay on the home row and neither depends on a physical Esc key.

Cmd versus Ctrl in an SSH session from an iPad

Ctrl+C sends byte 0x03 down the connection and the server's terminal turns it into SIGINT; Cmd+C copies text on the iPad and sends nothing to the server. That is the rule: Ctrl produces control characters that travel over SSH, while Cmd belongs to iPadOS and the app.

  • Cmd+Tab, Cmd+Space and Cmd+H are captured by the system to switch apps, search or go home. No SSH client can forward them.
  • Cmd+C and Cmd+V copy and paste through the iPad clipboard. Pasting a long command is more reliable than typing it.
  • Holding Cmd shows the list of shortcuts the foreground app offers.

Mac users often hit Cmd+C to stop a tail -f and nothing happens: you need Ctrl+C. The reverse fails too: Ctrl+V does not paste; in bash it inserts the next character literally.

Function keys F1–F12 over SSH from an iPad: what they send and what to use instead

A function key does not send a single character but an escape sequence starting with Esc: in an xterm-style terminal, F1 arrives as ^[OP. You can check what the server receives with cat -v, pressing each key followed by Return:

$ cat -v
^[
^[OP
^[
^C

The first line is Esc, the second F1 and the third Ctrl+[, identical to Esc. Exit with Ctrl+C. When a shortcut does nothing in a remote program, this test tells you whether the problem lies in the keyboard, the client or the program itself.

The tools that lean hardest on the function row offer alternatives:

  • htop: / instead of F3 to search, k instead of F9 to send a signal, q instead of F10 to quit.
  • Midnight Commander (mc): Esc followed by a digit acts as the function key; Esc 0 is F10.
  • On-screen keyboard: termi1 has an fn layer with F1–F12, PgUp/PgDn, Home and End for keyboards that lack them.

SSH on iPad versus desktop: key and shortcut comparison table

The gap between an iPad and a desktop comes down to Esc, Cmd and the function row; Ctrl behaves the same on both.

Key or situationiPad with external keyboardDesktop (Mac, Linux, Windows)
EscMissing on many keyboards; use Ctrl+[ or remap Caps LockPhysical key always present
CtrlPresent; can move to Caps Lock in SettingsPresent; remappable with system tools
CmdReserved for iPadOS and the app; never reaches the serverOn macOS, terminal app shortcuts; never reaches the server
F1–F12Often no physical row; on-screen keys or alternative shortcutsPhysical row; sometimes needs Fn
Option or Alt as MetaClient-dependent; Esc as prefix always worksConfigurable in most terminals
Network changeSSH drops; Mosh keeps the sessionRarer on a wired connection

tmux shortcuts on iPad: changing the prefix to type less

tmux uses Ctrl+B as its default prefix, a stretch on a compact keyboard. Many users switch it to Ctrl+A in ~/.tmux.conf:

# ~/.tmux.conf
set -g prefix C-a
unbind C-b
bind C-a send-prefix

Apply it without restarting via tmux source-file ~/.tmux.conf. Thanks to bind C-a send-prefix, pressing Ctrl+A twice passes Ctrl+A through to the program, so you keep bash's jump to the start of the line. The official tmux documentation wiki covers every other option.

tmux also solves the iPad's most annoying limitation: iPadOS can suspend a backgrounded app and the SSH connection drops. With tmux, whatever you left running stays alive on the server; with Mosh and its UDP transport (ports 60000-61000 by default), the session survives switching from Wi-Fi to mobile data. Mosh starts mosh-server over an initial SSH connection and does not do port forwarding or X11 forwarding.

An SSH terminal with its own keyboard such as termi1 combines Mosh and tmux, adds built-in SFTP, and offers an AI that types the command into the prompt without pressing Return, handy when you cannot remember a long syntax and would rather not type it all on a small keyboard.

Frequently asked questions

How do you press Esc on an iPad keyboard without an Escape key?

Esc on an iPad keyboard without an Escape key is sent with Ctrl+[, which produces the same ASCII 27 character that vim, less and tmux expect. You can also map Escape to Caps Lock under Settings > General > Keyboard > Hardware Keyboard, or tap the on-screen Esc key in your SSH client.

Why doesn't Cmd+C stop a process over SSH on an iPad?

Cmd+C does not stop a process over SSH because iPadOS reserves Cmd for system and app shortcuts, and in a terminal it copies text. To interrupt a command you need Ctrl+C, which sends byte 0x03 that the server turns into the SIGINT signal.

Can you use F1–F12 over SSH with an iPad keyboard?

F1–F12 work over SSH from an iPad as long as the keyboard or the client generates the matching escape sequences. If your keyboard has no function row, use the client's on-screen keys or alternative shortcuts: in htop, q replaces F10; in mc, Esc 0 equals F10.

Does an iPad SSH session drop when the network changes?

An SSH session from an iPad drops when switching from Wi-Fi to mobile data because the TCP connection is tied to the IP address. Mosh avoids this by using UDP on ports 60000-61000, and tmux keeps processes running on the server so you can pick them up after reconnecting.