Skip to content

Commit

Permalink
Media Copy sequence CSI 12 i to dump screen as image (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed Oct 26, 2020
1 parent 8321ab2 commit cd8dbcd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/termout.c
Original file line number Diff line number Diff line change
Expand Up @@ -2792,6 +2792,14 @@ do_csi(uchar c)
else if (arg0 == 10 && !term.esc_mod) {
term_export_html(false);
}
#ifdef support_SVG
else if (arg0 == 11 && !term.esc_mod) {
term_export_svg();
}
#endif
else if (arg0 == 12 && !term.esc_mod) {
term_save_image();
}
else if (arg0 == 0 && !term.esc_mod) {
print_screen();
}
Expand Down
1 change: 1 addition & 0 deletions wiki/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Terminal features
* Progress bar control sequence CSI %q.
* Optional automatic progress detection (mintty/wsltty#202).
* Media Copy sequence CSI 12 i to dump screen as image (#1051).

Configuration
* New option ProgressBar (mintty/wsltty#202).
Expand Down
16 changes: 16 additions & 0 deletions wiki/CtrlSeqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -560,3 +560,19 @@ supported; cursor colour can be set with the OSC 12 sequence.)
| **4** | lower_half |
| **5** | two_thirds |
| **6** | full block |


## Printing and screen dump ##

Mintty supports the following DEC, xterm and mintty Media Copy sequences:

| **sequence** | **effect** |
|:-------------|:--------------------------------|
| `^[[0i` | print screen to default printer |
| `^[[5i` | redirect output to printer |
| `^[[4i` | end output to printer |
| `^[[?5i` | copy output to printer |
| `^[[?4i` | end output to printer |
| `^[[10i` | save screen as HTML |
| `^[[12i` | save screen as PNG image |

0 comments on commit cd8dbcd

Please sign in to comment.