Operating system commands
Text-carrying commands for things outside the screen grid: the window title, the colors, and more. ECMA-48 defines only the frame, OSC, a string, and ST; what goes in the string was left to each system. Nearly all the numbers in use are xterm’s, and a terminal that has them follows xterm’s meaning.
| OSC 0 | Set Icon Name and Window Title | OSC 0 ; Pt ST |
… |
|---|---|---|---|
| OSC 1 | Set Icon Name | OSC 1 ; Pt ST |
… |
| OSC 2 | Set Window Title | OSC 2 ; Pt ST |
… |
| OSC 3 | Set X Property | OSC 3 ; prop = value ST |
… |
| OSC 4 | Change Color Palette | OSC 4 ; Pc ; Pt ST |
… |
| OSC 5 | Change Special Color | OSC 5 ; Pc ; Pt ST |
… |
| OSC 6 | Enable Special Color | OSC 6 ; Pc ; Pf ST |
… |
| OSC 7 | Report Working Directory | OSC 7 ; Pt ST |
… |
| OSC 8 | Hyperlink | OSC 8 ; Pp ; Pu ST |
… |
| OSC 9 | Desktop Notification | OSC 9 ; Pt ST |
… |
| OSC 9 ; 1 | Sleep | OSC 9 ; 1 ; ms ST |
… |
| OSC 9 ; 2 | Message Box | OSC 9 ; 2 ; text ST |
… |
| OSC 9 ; 3 | Tab Title | OSC 9 ; 3 ; text ST |
… |
| OSC 9 ; 4 | Progress Report | OSC 9 ; 4 ; Ps ; Pn ST |
… |
| OSC 9 ; 5 | Wait for a Key | OSC 9 ; 5 ST |
… |
| OSC 9 ; 6 | Run a Macro | OSC 9 ; 6 ; macro ST |
… |
| OSC 9 ; 7 | Run a Process | OSC 9 ; 7 ; cmd ST |
… |
| OSC 9 ; 8 | Environment Variable | OSC 9 ; 8 ; env ST |
… |
| OSC 9 ; 9 | Working Directory | OSC 9 ; 9 ; dir ST |
… |
| OSC 9 ; 10 | xterm Emulation | OSC 9 ; 10 ; n ST |
… |
| OSC 9 ; 11 | Comment | OSC 9 ; 11 ; text ST |
… |
| OSC 9 ; 12 | Prompt Start | OSC 9 ; 12 ST |
… |
| OSC 10 | Text Foreground Color | OSC 10 ; Pt ST |
… |
| OSC 11 | Text Background Color | OSC 11 ; Pt ST |
… |
| OSC 12 | Text Cursor Color | OSC 12 ; Pt ST |
… |
| OSC 13 | Pointer Foreground Color | OSC 13 ; Pt ST |
… |
| OSC 14 | Pointer Background Color | OSC 14 ; Pt ST |
… |
| OSC 15 | Tektronix Foreground Color | OSC 15 ; Pt ST |
… |
| OSC 16 | Tektronix Background Color | OSC 16 ; Pt ST |
… |
| OSC 17 | Highlight Background Color | OSC 17 ; Pt ST |
… |
| OSC 18 | Tektronix Cursor Color | OSC 18 ; Pt ST |
… |
| OSC 19 | Highlight Foreground Color | OSC 19 ; Pt ST |
… |
| OSC 21 | Kitty Colors, or DECSWT | OSC 21 ; key = value ; … ST |
… |
| OSC 22 | Change Pointer Shape | OSC 22 ; Pt ST |
… |
| OSC 30 | Tab Title (Konsole) | OSC 30 ; Pt ST |
… |
| OSC 31 | Working Directory (old Konsole) | OSC 31 ; Pt ST |
… |
| OSC 32 | Tab Icon (Konsole) | OSC 32 ; Pt ST |
… |
| OSC 34 | Tab Color (Konsole) | OSC 34 ; Pt ST |
… |
| OSC 46 | Change Log File | OSC 46 ; Pt ST |
… |
| OSC 50 | Set Font | OSC 50 ; Pt ST |
… |
| OSC 51 | Reserved for Emacs | OSC 51 ; Pt ST |
… |
| OSC 52 | Manipulate Selection Data | OSC 52 ; Pc ; Pd ST |
… |
| OSC 60 | Query Allowed Features | OSC 60 ST |
… |
| OSC 61 | Query Disallowed Features | OSC 61 ; Pt ST |
… |
| OSC 62 | Query Allowable Features | OSC 62 ; Pt ST |
… |
| OSC 66 | Text Sizing | OSC 66 ; metadata ; text ST |
… |
| OSC 72 | Drag and Drop | OSC 72 ; metadata ; payload ST |
… |
| OSC 99 | Desktop Notifications | OSC 99 ; metadata ; payload ST |
… |
| OSC 104 | Reset Color Palette | OSC 104 ; Pc ST |
… |
| OSC 105 | Reset Special Color | OSC 105 ; Pc ST |
… |
| OSC 106 | Special Color Modes | OSC 106 ; Pc ; Pf ST |
… |
| OSC 110 | Reset Text Foreground Color | OSC 110 ST |
… |
| OSC 111 | Reset Text Background Color | OSC 111 ST |
… |
| OSC 112 | Reset Text Cursor Color | OSC 112 ST |
… |
| OSC 113 | Reset Pointer Foreground Color | OSC 113 ST |
… |
| OSC 114 | Reset Pointer Background Color | OSC 114 ST |
… |
| OSC 115 | Reset Tektronix Foreground Color | OSC 115 ST |
… |
| OSC 116 | Reset Tektronix Background Color | OSC 116 ST |
… |
| OSC 117 | Reset Highlight Background Color | OSC 117 ST |
… |
| OSC 118 | Reset Tektronix Cursor Color | OSC 118 ST |
… |
| OSC 119 | Reset Highlight Foreground Color | OSC 119 ST |
… |
| OSC 133 | Semantic Prompt | OSC 133 ; Ps ST |
… |
| OSC 176 | Set App ID | OSC 176 ; Pt ST |
… |
| OSC 440 | Play Sound | OSC 440 ; Pt ST |
… |
| OSC 555 | Flash Screen | OSC 555 ST |
… |
| OSC 633 | VS Code Shell Integration | OSC 633 ; Ps [ ; Pt ] ST |
… |
| OSC 666 | Set Terminal Property | OSC 666 ; Pt ST |
… |
| OSC 701 | Set Locale | OSC 701 ; Pt ST |
… |
| OSC 702 | Report Version | OSC 702 ; ? ST |
… |
| OSC 710 | Set Normal Font | OSC 710 ; Pt ST |
… |
| OSC 711 | Set Bold Font | ||
| OSC 712 | Set Italic Font | ||
| OSC 713 | Set Bold Italic Font | ||
| OSC 720 | Scroll View Up | OSC 720 ; Pn ST |
… |
| OSC 721 | Scroll View Down | ||
| OSC 776 | Report Cell Size | OSC 776 ; ? ST |
… |
| OSC 777 | Perl Extension Command | OSC 777 ; prefix ; Pt ST |
… |
| OSC 1337 | iTerm2 Extensions | OSC 1337 ; Pt ST |
… |
| OSC 3008 | Hierarchical Context Signalling | OSC 3008 ; start=id ; type=… ST |
… |
| OSC 5522 | Clipboard by MIME Type | OSC 5522 ; metadata ; payload ST |
… |
| OSC 7770 | Set Font Size | OSC 7770 ; Pt ST |
… |
| OSC 7777 | Set Font and Window Size | OSC 7777 ; Pt ST |
… |
| OSC 9999 | Agent Status | OSC 9999 ; JSON ST |
… |
| OSC 21337 | Session Status | OSC 21337 ; key=value ; … ST |
… |
| OSC 30001 | Push Colors | OSC 30001 ST |
… |
| OSC 30101 | Pop Colors | OSC 30101 ST |
… |
| OSC I | Set Icon (dtterm) | OSC I Pt ST |
… |
| OSC L | Set Icon Name (dtterm) | OSC L Pt ST |
… |
| OSC P | Set Palette (Linux) | OSC P n rrggbb ST |
… |
| OSC R | Reset Palette (Linux) | OSC R ST |
… |
| OSC l | Set Window Title (dtterm) | OSC l Pt ST |
… |