# Keyboard Usage Mode (DECKBUM)

> Choose between typewriter keys and data processing keys.

- **Sequence:** `CSI ? 68 h`
- **DEC STD 070:** [§6.7.5 Set/Reset Keyboard Usage Mode, p. 6-57](https://archive.org/details/bitsavers_decstandar0VideoSystemsReferenceManualDec91_74264381/page/n543/mode/1up)
- **VT510:** [DECKBUM—Typewriter or Data Processing Keys](https://vt100.net/docs/vt510-rm/DECKBUM.html)

Mode 68 switches a DEC keyboard between *typewriter keys* (reset) and *data
processing keys* (set), which put the characters programmers use, such as
braces and brackets, where a national keyboard would have its own letters.
It changes only what the keyboard sends, which this site cannot press, so
nothing on the screen changes. DEC STD 070 calls it a user preference, which
software should set only when the user asks.

xterm recognizes the mode and ignores it
([`charproc.c`](https://github.com/ThomasDickey/xterm-snapshots/blob/xterm-411a/charproc.c#L8012-L8045)); [DECRQM](https://control-codes.page/csi/decrqm/index.html.md) reports it
as permanently reset, `4`, at level 3 and up, and xterm is a VT420 by default
([`do_dec_rqm`](https://github.com/ThomasDickey/xterm-snapshots/blob/xterm-411a/misc.c#L5783-L5803)). esctest2 expects the mode to change and
lists xterm as not supporting it; the cases follow xterm.

libghostty-vt does not have the mode: mode 68 is not in its table in
`modes.zig`, so DECRQM reports it as not recognized, `0`. The two DECRQM cases
are known differences.

## Validation

### DECKBUM-1: Reported as permanently reset

*A known difference: libghostty-vt does not pass this case.*

Input, one step per line:

```text
\e[?68$p
```

Expected screen:

```text
|_____|
reply \e[?68;4$y
```

### DECKBUM-2: Even after it is set

*A known difference: libghostty-vt does not pass this case.*

Input, one step per line:

```text
\e[?68h
\e[?68$p
```

Expected screen:

```text
|_____|
reply \e[?68;4$y
```

### DECKBUM-3: Nothing on the screen changes

Input, one step per line:

```text
A
\e[?68h
B
```

Expected screen:

```text
|AB___|
```

---

This is the Markdown version of <https://control-codes.page/modes/deckbum/>. On that page every validation case runs live in libghostty-vt, the terminal emulation core of Ghostty, compiled to WebAssembly.

The validation cases are written in the notation described in <https://control-codes.page/notation/index.html.md>.
