OhmNomNom / thyme

A fork of mintty, for the modern world
GNU General Public License v3.0
0 stars 0 forks source link

Toggle between primary and alternate screens #174

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A feature of xterm that I sorely miss in mintty is the ability to press
Shift+Del to perform set-altscreen(toggle).  For example in vim, it is
convenient to switch to the primary screen, copy prior commands or their
outputs, switch back to the alternate screen, and paste without having to
use Ctrl+Z and fg.  Also at the command line, it is nice to switch to the
alternate screen, observe the most recently viewed man page, and switch
back to the primary screen without having to rerun man and finding where I
left off.  Please consider adding a keyboard shortcut for toggling between
screens.

Original issue reported on code.google.com by rob.r...@ymail.com on 23 Mar 2010 at 2:04

GoogleCodeExporter commented 9 years ago
Check "Enable scrollback on alternate screen" on the Window pane of the options 
and 
(scroll modifier)+PageUp will take you to the primary screen content. (I think 
I'll 
rename that option to "Access scrollback from alternate screen", to hopefully 
make 
its purpose a bit clearer.)

Shift+Del isn't a default xterm shortcut, is it? It's quite likely to be used 
by 
applications, e.g. it's the 'Cut' shortcut in the CUA guidelines. I might put 
it on 
Alt+F6 or something like that. Or perhaps leave things as they are for the 
alternate 
screen, and use (scroll modifier)+PageDn to accesss the alternate screen from 
the 
primary one?

Btw, I'm not convinced by xterm's handling of output while looking at the other 
screen: the output simply goes to the screen you're looking at, thereby messing 
up 
both the actual screen contents and the application's sense of it.

Original comment by andy.koppe on 23 Mar 2010 at 6:56

GoogleCodeExporter commented 9 years ago
Thanks for the (scroll modifier)+PageUp tip!  I understood the option but didn't
consider using it because in xterm, unfortunately, scrollback from the alternate
screen does not reveal the most recent lines in the primary screen.

Shift+Del is not a default but I set it up via the translation resource because 
it's
relatively easy to reach, there's no need to "Cut", and Shift+Del is close to 
the
shortcuts for the scrollback buffer (Shift+Home, Shift+End, Shift+PageUp,
Shift+PageDn).  Someone who actually uses Shift+Del could change the "Modifier 
for
scrolling" option so I have a strong preference for (scroll modifier)+Del.  I 
think
that (scroll modifier)+PageDn would be surprising and Alt+F6 would be hard to 
reach
but something like (scroll modifier)+F12 or Alt+F12 would be okay.

I agree about xterm's handling of output.

Original comment by rob.r...@ymail.com on 23 Mar 2010 at 3:54

GoogleCodeExporter commented 9 years ago
There may be no need to "Cut" for you, but users of other applications may 
think 
otherwise. Changing the scroll modifier is no good if you're used to 
Shift+PageUp/Dn, 
and Ctrl+Del is the CUA shortcut for deleting a word. Also, there's no mnemonic 
connection between 'Delete' and swapping buffers.

The idea with (scroll modifier)+PageDn would be that if PageUp takes you from 
the 
alternate screen to the primary one, then PageDn should do the opposite. 
Alt+F12 
certainly is a possibility though.

Original comment by andy.koppe on 23 Mar 2010 at 7:45

GoogleCodeExporter commented 9 years ago
I agree that Del is not the best choice for users in general.  I understand the
rationale for (scroll modifier)+PageDn and it's good, but I worry that it would 
be
surprising for people who typically hold down Shift+PageDn instead of pressing
Shift+End.  I now think that ScrollLock or (scroll modifier)+ScrollLock would be
ideal but I'd be happy with Alt+F12.

Original comment by rob.r...@ymail.com on 24 Mar 2010 at 12:55

GoogleCodeExporter commented 9 years ago
I also pondered sticking the alternate screen at the top of the primary 
screen's 
scrollback, so Shift+Home would take you there, but I think your concern about 
mixing 
screens in that way is valid, even more so in the light of issue 176.

So back, to trying to find a shortcut key for completely switching screens. Not 
sure 
about ScrollLock either. It's rather far away, it might cause trouble with the 
ScrollLock LED, and some keyboards don't even have it anymore.

How about an option for using Ctrl+Tab for this, in addition to Alt+F12? 
Ctrl+Tab is 
easy to reach, it's fairly mnemonic, and it doesn't have a standard terminal 
keycode. 
Of course it might already be used by 'screen' users and others anyway, which 
is why 
I wouldn't want to make it the default.

I could also put it in the context menu, probably in a new submenu called 
'Terminal', 
together with 'Reset' and 'Default Size'.

Original comment by andy.koppe on 4 Apr 2010 at 10:53

GoogleCodeExporter commented 9 years ago
A Ctrl+Tab option would be great but, if you're worried about having too many 
options, then just Alt+F12 would be fine.  IMHO, users shouldn't have to go to 
the 
context menu for this, but it would be nice to also have it there.  A 
"Terminal" 
submenu sounds like a logical place for it, but I'm not sure that you need a 
submenu 
since the context menu is not too large.  I don't use the context menu enough 
to 
have a strong opinion about its layout.

Original comment by rob.r...@ymail.com on 5 Apr 2010 at 6:10

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 12 Apr 2010 at 5:41

GoogleCodeExporter commented 9 years ago
Implemented Alt+F12 shortcut and "Other screen" context menu entry in r834 on 
trunk. 
Leaving Ctrl+Tab for now.

Original comment by andy.koppe on 15 Apr 2010 at 8:36

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 3 May 2010 at 7:44

GoogleCodeExporter commented 9 years ago
A belated thanks for this suggestion. I use the Alt+F12 shortcut almost every 
day.

Original comment by andy.koppe on 5 Jul 2012 at 8:34