Open miniksa opened 5 years ago
This should probably just be cross-referenced against the Microsoft/Terminal repo.
The page was misleading me quite a bit because it advertizes ESC D
for "move cursor left" but Windows terminal implements it as "line feed without return", see discussion in https://github.com/microsoft/terminal/issues/11005.
The page was misleading me quite a bit because it advertizes
ESC D
for "move cursor left" but Windows terminal implements it as "line feed without return", see discussion in microsoft/terminal#11005.
Yes, sorry, there's a long standing thought that we need to overhaul this entire page. @oising was working on a script at some point in time to help us do that, but I think he ran out of time on it.
I just need to have a few days and sit down and spelunk the code history and line up all the sequences we have now and when they were added or changed.
Hey @miniksa - I didn't run out of time :) I just don't know where you guys want to go from here. The script still works, as long as you use the same comment conventions and the cpp structure doesn't change too much. What do we want to do? I am eager to help if you have a plan in mind...
I just updated main
locally and ran the script:
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
CAN | Cancel | VT100 |
✓ | ✓ |
SUB | Substitute | VT100 |
✓ | ✓ |
ESC | Escape | VT100 |
✓ | ✓ |
DCS | Device Control String | VT220 |
✓ | ✓ |
CSI | Control Sequence Introducer | VT100 |
✓ | ✓ |
ST | String Terminator | VT220 |
✓ | ✓ |
OSC | Operating System Command | DECterm |
✓ | ✓ |
PM | Privacy Message | `` | ✓ | ✓ |
APC | Application Program Command | VT420 |
||
S7C1T | Select 7-bit C1 Transmission | VT220 |
||
S8C1T | Select 8-bit C1 Transmission | VT220 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
LS0 | Locking Shift Zero (SI) | VT100 |
✓ | |
LS1 | Locking Shift One (SO) | VT100 |
✓ | |
LS2 | Locking Shift Two | VT220 |
✓ | |
LS3 | Locking Shift Three | VT220 |
✓ | |
LS1R | Locking Shift One Right | VT220 |
✓ | |
LS2R | Locking Shift Two Right | VT220 |
✓ | |
LS3R | Locking Shift Three Right | VT220 |
✓ | |
SS2 | Single Shift Two | VT220 |
✓ | |
SS3 | Single Shift Three | VT220 |
✓ |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
SCS | Select Character Set | VT100 |
✓ | |
DECNRCM | (National Replacement) Character Set Mode | VT220 |
||
DECAUPSS | Assign User-Preference Supplemental Set | VT320 |
||
DECRQUPSS | Request User-Preference Supplemental Set | VT320 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DA1 | Primary Device Attributes | VT100 |
✓ | |
DA2 | Secondary Device Attributes | VT220 |
✓ | |
DA3 | Tertiary Device Attributes | VT420 |
✓ | |
DSR | Device Status Report | VT100 |
✓ | |
DECID | Identify Device | VT100 |
||
DECTID | Select Terminal ID | VT510 |
||
DECSCL | Select Conformance Level | VT220 |
||
DECSR | Secure Reset | VT420 |
||
DECSRC | Secure Reset Confirmation | VT420 |
||
DECSTR | Soft Terminal Reset | VT220 |
✓ | ✓ |
DECSTUI | Set Terminal Unit ID (Restricted) | VT420 |
||
RIS | Reset to Initial state | VT100 |
✓ | ✓ |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECPCTERM | Enter/Exit PC Term Mode from DEC VT mode | VT420PC |
||
DECTME | Terminal Mode Emulation | VT510 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECSSL | Select Set-Up Language | VT510 |
||
DECCRTSM | CRT Save Mode (not required) | VT510 |
||
DECOSCNM | Overscan Mode | VT510 |
||
DECSRFR | Select Refresh Rate | VT510 |
||
DECLTOD | Load Time of Day | VT510 |
||
DECLBAN | Load Banner Message | VT510 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECTCEM | Text Cursor Enable Mode | VT220 |
✓ | ✓ |
DECSCUSR | Set Cursor Style | VT510 |
✓ | ✓ |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECSTBM | Set Top and Bottom Margin | VT100 |
✓ | |
DECSLRM | Set Left and Right Margin | VT420 |
||
DECLRMM | Left Right Margin Mode | VT420 |
||
DECOM | Origin Mode | VT100 |
✓ | |
DECSCLM | Scrolling Mode | VT100 |
||
IND | Index | VT100 |
✓ | ✓ |
RI | Reverse Index | VT100 |
✓ | |
DECFI | Forward Index | VT420 |
||
DECBI | Back Index | VT420 |
||
DECSSCLS | Set Scroll Speed | VT510 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
BS | Backspace | VT100 |
✓ | ✓ |
LF | Line Feed | VT100 |
✓ | ✓ |
VT | Vertical Tab | VT100 |
✓ | ✓ |
FF | Form Feed | VT100 |
✓ | ✓ |
CR | Carriage Return | VT100 |
✓ | ✓ |
NEL | Next Line | VT100 |
✓ | ✓ |
LNM | Line Feed/New Line Mode | VT100 |
||
CUU | Cursor Up | VT100 |
✓ | ✓ |
CUD | Cursor Down | VT100 |
✓ | |
CUF | Cursor Forward | VT100 |
✓ | ✓ |
CUB | Cursor Backward | VT100 |
✓ | ✓ |
CUP | Cursor Position | VT100 |
✓ | ✓ |
HVP | Horizontal/Vertical Position | VT100 |
✓ | ✓ |
DSR-CPR | Device Status Report (Cursor Position Report) | VT100 |
✓ | |
DSR-XCPR | Device Status Report (Extended Cursor Position Report) | VT340 VT420 |
||
CHA | Cursor Horizontal Absolute | VT510 |
✓ | |
CNL | Cursor Next Line | VT510 |
✓ | |
CPL | Cursor Previous Line | VT510 |
✓ | |
HPA | Horizontal Position Absolute | VT510 |
✓ | |
HPR | Horizontal Position Relative | VT510 |
✓ | |
VPA | Vertical Line Position Absolute | VT510 |
✓ | |
VPR | Vertical Position Relative | VT510 |
✓ |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
HT | Horizontal Tab | VT100 |
✓ | ✓ |
HTS | Horizontal Tabulation Set | VT100 |
✓ | ✓ |
TBC | Tabulation Clear | VT100 |
✓ | ✓ |
CBT | Cursor Backward Tabulation | VT510 |
✓ | ✓ |
CHT | Cursor Horizontal Forward Tabulation | VT510 |
✓ | ✓ |
DECST8C | Set Tab at every 8 columns | VT420PC |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECCOLM | Column Mode | VT100 |
✓ | |
DECNCSM | No Clear Screen on column Mode | VT510 |
||
DECSCPP | Set Columns Per Page | VT340 VT420 |
||
DECSLPP | Set Lines Per Page | VT340 VT420 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
NP | Next Page | VT340 VT420 |
||
PP | Preceding Page | VT340 VT420 |
||
PPA | Page Position Absolute | VT340 VT420 |
||
PPR | Page Position Relative | VT340 VT420 |
||
PPB | Page Position Backward | VT340 VT420 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECSASD | Select Active Status Display | VT340 VT320 |
||
DECSSDT | Select Status Display Type | VT340 VT320 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECRLM | Right to Left Mode | VT510 |
||
DECRLCM | Right to Left Copy Mode | VT510 |
||
DDD1 | VT100 mode Hebrew |
VT510 |
||
DDD2 | VT100 mode Hebrew |
VT510 |
||
DDD3 | VT100 mode Hebrew |
VT510 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECHCCM | Horizontal Cursor Coupling Mode | VT340 VT420 |
||
DECVCCM | Vertical Cursor Coupling Mode | VT340 VT420 |
||
DECPCCM | Page Cursor Coupling Mode | VT340 VT420 |
||
DECRQDE | Request Displayed Extent | VT340 VT420 |
||
DECSNLS | Select Number of Lines per Screen (exception) | VT420 |
||
DECARSM | Auto Resize Mode | DECterm VT420 |
||
SU | Pan Down | VT340 VT420 |
✓ | |
SD | Pan Up | VT340 VT420 |
✓ |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECSCNM | Screen Mode | VT100 |
✓ | ✓ |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECSWL | Single Width Line | VT100 |
✓ | |
DECDWL | Double Width Line | VT100 |
✓ | |
DECDHLT | Double Height Line Top | VT100 |
||
DECDHLB | Double Height Line Bottom | VT100 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
SGR | Select Graphic Rendition | VT100 |
✓ | ✓ |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
BEL | Warning Bell | VT100 |
✓ | ✓ |
DECSKCV | Set Keyclick Volume | VT510 |
||
DECSWBV | Set Warning Bell Volume | VT510 |
||
DECSMBV | Set Margin Bell Volume | VT510 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
IRM | Insert/Replacement Mode | VT102 |
||
ICH | Insert Character | VT102 |
✓ | ✓ |
DCH | Delete Character | VT102 |
✓ | ✓ |
IL | Insert Line | VT100 |
✓ | |
DL | Delete Line | VT100 |
✓ | |
DECIC | Insert Column | VT420 |
||
DECDC | Delete Column | VT420 |
||
ECH | Erase Character | VT100 |
✓ | ✓ |
EL | Erase in Line | VT100 |
✓ | ✓ |
DECSEL | Selective Erase in Line | VT220 |
||
ED | Erase in Display | VT100 |
✓ | ✓ |
DECSED | Selective Erase in Display | VT220 |
||
DECSCA | Select Character Attribute (selective erase) | VT220 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECCRA | Copy Rectangular Area | VT420 |
||
DECFRA | Fill Rectangular Area | VT420 |
||
DECERA | Erase Rectangular Area | VT420 |
||
DECSERA | Selective Erase Rectangular Area | VT420 |
||
DECCARA | Change Attribute in Rectangular Area | VT420 |
||
DECRARA | Reverse Attribute in Rectangular Area | VT420 |
||
DECSACE | Select Attribute Change Extent Mode | VT420 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECRQCRA | Request Checksum of Rectangular Area | VT420 |
||
DSR-DECCKSR | Device Status Report (Memory Checksum) | VT420 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECDMAC | Define Macro | VT420 |
||
DECINVM | Invoke Macro | VT420 |
||
DSR-MSR | Device Status Report (Macro Space Report) | VT420 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECSC | Save Cursor | VT100 |
✓ | |
DECRC | Restore Cursor | VT100 |
✓ |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECRQM | Request Mode | VT320 |
||
DECNKM | Numeric Keypad Mode | VT320 |
||
DECRQSS | Request Selection or Setting | VT320 |
||
DECRQPSR | Request Presentation State Report | VT320 |
||
DECRSPS | Restore Presentation State | VT320 |
||
DECRQTSR | Request Terminal State Report | VT320 |
||
DECRSTS | Restore Terminal State | VT320 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECARM | Autorepeat Mode | VT100 |
||
DECBKM | Backarrow Key Mode | VT420 |
||
DECCKM | Cursor Keys Mode | VT100 |
✓ | ✓ |
DECKBUM | Keyboard Usage Mode | VT320 |
||
DECKPAM | Keypad Application Mode | VT100 |
✓ | ✓ |
DECKPM | Key Position Mode | VT420 |
||
DECKPNM | Keypad Numeric Mode | VT100 |
✓ | ✓ |
DECNKM | Numeric Keypad Mode | VT320 |
||
DSR-KBD | Device Status Report (keyboard status) | VT220 |
||
KAM | Keyboard Action Mode | VT220 |
||
DECLFC | Local Functions Control | VT420 |
||
DECLFKC | Local Function Key Control | VT420 |
||
DECSMKR | Select Modifier Key Reporting | VT420 |
||
DECHEBM | Hebrew Keyboard Map mode | VT510 |
||
DECHCEM | Hebrew Encoding Mode | VT510 |
||
DECNAKB | NA/Greek Selection | VT510 |
||
DECESKM | Secondary Keyboard Language Mode | VT510 |
||
DECSLCK | Set Lock Key Style | VT510 |
||
DECKBD | Keyboard Dialect Selection | VT510 |
||
DECNUMLK | NumLock Mode | VT510 |
||
DECCAPSLK | CapsLock Mode | VT510 |
||
DECKLHIM | Keyboard LEDs Host Indicator Mode | VT510 |
||
DECLL | Load LEDs | VT100 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECUDK | User Defined Keys | VT220 |
||
DSR-UDK | Device Status Report (UDK lock) | VT220 |
||
DECPKA | Program Key Action | VT510 |
||
DECPFK | Program Function Key | VT510 |
||
DECPAK | Program Alphanumeric Key | VT510 |
||
DECCKD | Copy Key Default | VT510 |
||
DECRQPKFM | Program Key Free Memory Inquiry | VT510 |
||
DECRQKT | Inquire a Key Type | VT510 |
||
DECRQKD | Inquire a Key Definition | VT510 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECDLD | Downline Load | VT220 |
✓ |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECPEX | Print Extent Mode | VT220 |
||
DECPFF | Print Form Feed Mode | VT220 |
||
DSR-PP | Device Status Report (printer port) | VT220 |
||
MC | Media Copy | VT220 |
||
DECSPRTT | Select Printer Type | VT510 |
||
DECSDPT | Select Digital Printed Data Type | VT510 |
||
DECSPPCS | Select Proprinter Character Set | VT510 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
BREAK | BREAK | VT100 |
||
XON | XON | VT100 |
||
XOFF | XOFF | VT100 |
||
ENQ | Enquiry | VT100 |
||
SRM | Send Receive Mode | VT220 |
||
DECXRLM | Transmit Rate Limiting Mode | VT420 |
||
DECMCM | Modem Control Mode | VT510 |
||
DECAAM | Auto Answerback Mode | VT510 |
||
DECLANS | Load Answerback Message | VT510 |
||
DECCANSM | Conceal Answerback Message Mode | VT510 |
||
DECNULM | Ignore Null Mode | VT510 |
||
DECHPDXM | Half Duplex Mode | VT510 |
||
DECSFC | Select Flow Control | VT510 |
||
DECSDDT | Select Disconnect Delay Time | VT510 |
||
DECSTRL | Set Transmit Rate Limit | VT510 |
||
DECSCS | Select Communication Speed | VT510 |
||
DECSCP | Select Communication Port | VT510 |
||
DECSPP | Set Port Parameter | VT510 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECEFR | Enable Filter Rectangle | UWS |
||
DECELR | Enable Locator Reports | UWS |
||
DECLKD | Locator Key Definition | UWS |
||
DECLRP | Locator Report | UWS |
||
DECRQLP | Request Locator Position | UWS |
||
DECSLE | Select Locator Events | UWS |
||
DSR-LS | Device Status Report (Locator Status) | UWS |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECES | Enable Sessions | VT340 VT420 |
Symbol | Function | Origin 🖳 | Console Host | Terminal |
---|---|---|---|---|
DECANM | ANSI /VT52 Mode |
VT100 |
✓ | |
DECALN | Screen Alignment | VT100 |
✓ | |
DECAWM | Autowrap Mode | VT100 |
✓ | |
DECTST | Invoke Confidence Test | VT100 |
||
CRM | Control Representation Mode | VT100 |
Generated on 08/26/2021 15:48:11
I think maybe what was missing was the ability to manually flag sequences as being implemented in the master csv list as they are not exposed on ITermDispatch
?
It would also be cool if I could specify, either in comments near the functions, or in the CSV... which version they originated in so I can spelunk the OS repo and mark that out.
And probably what I should do is put this script into the Terminal side CI and make it poop out updates to this doc directly as pull requests against this repo so it actually happens on a regular basis...
I'll then have to figure out how to reconcile what this outputs with the data already on the existing VT sequences page. I did have a handful of boilerplate text in each section in the existing page... https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
I wonder if I could add some sort of comments field to each method and each section header so I could just always regenerate the whole page from source data. Or if I should leave/trim the existing page down to give a general overview and then link out to this generated page for full details...
And sorry I guess you didn't run out of time. I ran out of mental capacity to realize that this completed and merged. I blame pandemic.
@miniksa -- hah! Actually now that I look at it, there are some minor fixes to be made due to case sensitivity issues on the repo (that don't bother me on windows) -- I'm making a tiny PR to fix them
I'll ping you on Teams and we can chat there, tomorrow?
I'll ping you on Teams and we can chat there, tomorrow?
Yeah hit me up. We'll figure out something. Thanks man.
We should expand this table to be more comprehensive, by far.