# Query Allowed Features (OSC 60)

> Ask xterm which of its optional, security-sensitive features are allowed.

- **Sequence:** `OSC 60 ST`
- **ECMA-48:** [§8.3.89 OSC – Operating System Command, p. 51](https://archive.org/details/ecma-48-5th-edition-june-1991/page/n64/mode/1up)
- **xterm:** [Operating System Commands](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html)

Several of xterm's features are switched on or off by resources, because
they could be abused by anything written to the terminal: colors, fonts,
the mouse, pasting controls, termcap queries, titles, and window
operations. Each has an `allow…` resource, and a `disallowed…` list of the
parts of it refused while the `allow…` resource is off. XTQALLOWED,
`OSC 60 ST`, asks which `allow…` resources are on, and is answered
`OSC 60 ; list ST` with their names separated by commas
([`report_allowed_ops`](https://github.com/ThomasDickey/xterm-snapshots/blob/xterm-411a/misc.c#L3939-L3963)).
It takes no `;` and nothing after it; with something there, it is ignored.
[OSC 61](https://control-codes.page/osc/disallowed/index.html.md) asks which parts of a feature are refused, and
[OSC 62](https://control-codes.page/osc/allowable/index.html.md) which parts it has.

In a default xterm, `allowColorOps`, `allowFontOps`, `allowMouseOps`,
`allowTcapOps` and `allowTitleOps` are on, and `allowPasteControls` and
`allowWindowOps` off. The case follows it.

This is xterm's own, and libghostty-vt does not have it, so the case is a
known difference.

## Validation

### OSC60-1: Which features are allowed

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

Input, one step per line:

```text
\e]60\a
```

Expected screen:

```text
|______|
reply \e]60;allowColorOps,allowFontOps,allowMouseOps,allowTcapOps,allowTitleOps\a
```

---

This is the Markdown version of <https://control-codes.page/osc/allowed/>. 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>.
