Skip to main content

DECKPAM/DECKPNM

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard

DECKPAM (Keypad Application Mode) and DECKPNM (Keypad Numeric Mode) are DEC VT100 escape sequences that control what the numeric keypad transmits when keys are pressed.

Syntax​

ESC =         DECKPAM — Enter application keypad mode
ESC > DECKPNM — Enter numeric keypad mode
Formal syntax
DECKPAM = 0x1b, "=" ;
DECKPNM = 0x1b, ">" ;

Description​

DECKPAM — Application mode (ESC =)​

Per the VT510 manual, DECKPAM causes the numeric keypad to send application-specific escape sequences instead of the characters printed on the keys. In this mode, each keypad key generates a unique SS3-prefixed sequence (e.g., ESC O p for key 0, ESC O q for key 1, etc.).

This mode is commonly used by full-screen applications like text editors (e.g., vi, Emacs) and TUI libraries (e.g., ncurses) that need to distinguish keypad input from regular number input.

DECKPNM — Numeric mode (ESC >)​

DECKPNM restores the keypad to its default numeric mode, where keys send the literal characters printed on them: digits 0-9, period (.), comma (,), and minus (-).

Default behavior​

The terminal defaults to numeric keypad mode on power-up and after a reset. The setting is not saved to non-volatile memory.

note

DECKPAM/DECKPNM function identically to the DECNKM mode (DECSET/DECRST mode 66) on the VT510. Most modern terminal emulators support both mechanisms.

Examples​

printf '\e='     # Enable application keypad mode
printf '\e>' # Return to numeric keypad mode

Specifications​

SpecificationSection
VT510 Reference—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✓YesESC =/> listed as IMPLEMENTED in docs/escape_support.md; handlers set_keypad_application_mode() at term/mod.rs:2180 and unset_keypad_application_mode() at term/mod.rs:2186
Bobcat✓0.9.0PCStyleFunctionKeys() toggle (Terminal.cpp:355) indicates keypad mode support
contour✓v0.1.0ESC = (DECKPAM) and ESC > (DECKPNM) control keypad mode
foot✓YesImplemented in vt.c:531-536 as ESC =/>
Ghostty✓v1.0.0ESC = and ESC > handled in stream.zig:2339-2353
iTerm2✓Yes
Kitty✓Yes
Konsole✓Yes
mintty✓YesDECKPAM (ESC =) at src/termout.c:1956-1957, DECKPNM (ESC >) at src/termout.c:1958-1959
mlterm✓rel-0_2_1
PuTTY✓0.45
Rio✓v0.0.28
rxvt-unicode✓rxvt-unicode-1.2
st✓0.4
terminology✓v0.1.0
VT100✓Yes
VTE✓Yes
WezTerm✓YesHandled in performer.rs:602-608 via EscCode::DecApplicationKeyPad (ESC =) and DecNormalKeyPad (ESC >)
Windows Terminal✓YesESC = sets keypad application mode, ESC > sets numeric mode in OutputStateMachineEngine.cpp:211-215
xterm✓YesImplemented in charproc.c:4922-4933. Sets/clears MODE_DECKPAM
xterm.js✓3.5.0
Multiplexers
cy✓v0.1.0
GNU Screen✓v.4.2.0DECKPAM (ESC =) and DECKPNM (ESC >) at src/ansi.c:748-759
tmux✓1.3Application/numeric keypad mode toggle
tuios✓v0.0.15
Zellij✗No