KetraTerm
API · DevelopmentAll versions

requestDeviceStatusReport

abstract fun requestDeviceStatusReport(mode: Int, decPrivate: Boolean)

Enqueues a device status report (DSR) response.

Allowlisted requests are ANSI 5 (operating status), ANSI/private 6 (cursor position), and private 996 (host color scheme). The latter replies with CSI ?997;1n for dark or CSI ?997;2n for light using the host theme palette, independently of application color overrides. Unsupported requests stay silent; the color-scheme protocol defines no failure reply. Host adapters must enforce terminal-response policy before calling this API. Both cursor-position forms use one-based coordinates relative to the active origin: top margin under DECOM, and left margin under DECOM plus DECLRMM. With DECOM off they report absolute viewport coordinates. Positions restored before the origin report row/column 1 rather than a non-positive coordinate.

Parameters

mode

The DSR mode parameter.

decPrivate

true if this is a DEC private DSR (? prefix), false for standard ANSI.