Some Bits: Nelson's log

mintty/wsltty: Ctrl+Shift+Letter

TIL; mintty, the venerable Cygwin terminal emulator, has an option so you can use Ctrl-Shift-C to copy and Ctrl-Shift-V to paste. mintty has been around forever and has a second life as wsltty, a very specifically adapted to easily launch Microsoft’s WSL environment. No cygwin required.

To enable it, right click a mintty window, go to keys, and tick on the box “Ctrl+Shift+letter shortcuts”. The full list of shortcuts is in the mintty man page.

– Ctrl+Shift+A: Select all
– Ctrl+Shift+C: Copy
– Ctrl+Shift+V: Paste
– Ctrl+Shift+N: New
– Ctrl+Shift+H: Search scrollback buffer
– Ctrl+Shift+W: Close
– Ctrl+Shift+R: Reset
– Ctrl+Shift+D: Default terminal size (rows/columns)
– Ctrl+Shift+F: Full screen (not zooming font despite Shift)
– Ctrl+Shift+S: Flip screen
– Ctrl+Shift+O: Toggle scrollbar
– Ctrl+Shift+P: Cycle pointer styles
– Ctrl+Shift+T: Cycle or tune transparency levels

Some of those are insane (“close window”?!), but the copy/paste shortcuts are lifesavers.

(I finally figured this out after finally mustering the encourage to install Windows 1809, which includes Ctrl-Shift-C for stock WSL consoles. A whole OS update for a keybinding! Then I realized I don’t use stock WSL consoles anyway. oops.

Update: while I’m here, mintty has a nifty feature I’d never heard of before.

Flip screen
Applications such as editors and file viewers normally use a terminal feature called the alternate screen, which is a second screen buffer without scrollback. When they exit, they switch back to the primary screen to restore the command line as it was before invoking the application.

The Flip Screen menu command and Alt+F12 shortcut allow looking at the primary screen while the alternate screen is active, and vice versa. For example, this allows to refer to past commands while editing a file.

30 years of using ttys as my user interface and I’d never heard of this. You know how you run less or emacs or whatever and lose whatever was on the screen to the fullscreen program? Alt-F12 shows what’s hidden. Amazing!

The virtual tabs feature is neat too. The mintty authors don’t want to add a full tab UI, but they do have a quick session switcher built in via Mouse Button 5, Ctrl-Shift-I, or the menu.

It also supports SIXEL graphics. Sadly, no Tektronix 4014.