DECRPM—Report Mode - Terminal To Host

Reports the terminal mode in response to a request mode (DECRQM) function. In the response DECRPM informs the host if a certain mode is set (SM—Set Mode) or reset (RM—Reset Mode).

Programming Tip
Applications can use the information in the DECRPM report to save the current mode settings. Later, the application can restore the mode settings that were saved.

This operation is useful for applications that need to temporarily change some of the terminal's mode settings. When the application is finished, it can restore the mode settings that were in effect before the application changed them. You use the set mode (SM) and reset mode (RM) functions to restore mode settings. SM and RM are described later in this chapter.

There are two versions of DECRPM, for ANSI and DEC modes.

Reporting ANSI Modes

CSI
9/11
Pa
3/n
;
3/11
Ps
3/n
$
2/4
y
7/9

Reporting DEC Modes

CSI
9/11
?
3/15
Pd
3/n
;
3/11
Ps
3/n
$
2/4
y
7/9

Parameters

Pa
Table 5–6 lists the values for Pa.

Pd
indicates which DEC mode the terminal is reporting on. Table 5–6 lists the values for Pd.

Ps
indicates the setting of the mode. The Ps values are the same for the ANSI and DEC versions.

Ps Mode Setting
0 Mode not recognized
1 Set
2 Reset
3 Permanently set
4 Permanently reset

Examples

The following sequence reports the setting of a DEC mode:

VT510 Report Meaning
CSI ? 57; h (Greek) Keyboard mapping is currently set.
(57 = DECNAKB, h = set)

The following sequences report the setting for some modes:

CSI Ps $ p (or CSI ? Ps $ p (DEC)) (Request Mode)

CSI Ps1; Ps2 $ y (or CSI ? Ps1; Ps2 $ y) (Report Mode)

CSI P1.....Pn l (Reset Mode)

CSI P1.....Pn h (Set Mode)

Notes on DECRPM

The terminal can only report on one mode at a time.

Description

DECRQM, DECRPM, SM, and RM support all the mode settings as follows:

Table 5–6 Settings Supported by DECRQM, DECRPM, RM, and SM
ANSI Mode DEC Mode
Pa Mnemonic Pd Mnemonic

*This mode is always reset in the terminal and cannot be changed.

†When the terminal is set to VT52 mode, DECRQM provides no report.

1 GATM* ?1 DECCKM
2 KAM ?2 DECANM†
3 CRM ?3 DECOLM
4 IRM ?4 DECSCLM
5 SRTM* ?5 DECSCNM
?6 DECOM
7 VEM* ?7 DECAWM
?8 DECARM
10 HEM*
11 PUM*
12 SRM
13 FEAM*
14 FETM*
15 MATM*
16 TTM*
17 SATM*
18 TSM* ?18 DECPFF
19 EBM* ?19 DECPEX
20 LNM
?25 DECTCEM
?34 DECRLM
?35 DECHEBM
?36 DECHEM
?42 DECNRCM
?57 DECNAKB
?60 DECHCCM *
?61 DECVCCM
?64 DECPCCM
?66 DECNKM
?67 DECBKM
?68 DECKBUM
?69 DECLRMM (DECVSSM)
?73 DECXRLMM
?95 DECNCSM
?96 DECRLCM
?97 DECCRTSM
?98 DECARSM
?99 DECMCM
?100 DECAAM
?101 DECCANSM
?102 DECNULM
?103 DECHDPXM
?104 DECESKM
?106 DECOSCNM