The problem with Control-Shift-A is that most terminal emulation programs do not send a different code for it from the one sent by Control-A, so there would be no way for screen to tell the difference.
You might be able to use C-q if you do stty -ixon
to disable “software flow control” on the tty. I usually do this so I can use C-s to search on the command line.
You might consider C-^, since it seems to be usually unbound. It is Control-Shift-6 on US keyboard layouts, but it may be difficult to type on other layouts.
Most people never use the tty control character C-\ to send SIGQUIT. To use it, disable the tty functionality with with stty quit undef
and bind it as your prefix key. This is a bit risky though, since if you hit C-\ on a tty where the quit key has not been disabled with stty, you might kill the foreground process instead of activating screen.
I switched to tmux a while ago. Its default is C-b because it was developed under screen and did not interfere with screen's default. I have found that C-b works fairly well for me (I usually use the arrow keys for single character movement on the shell command line—though I use M-b and M-f to move by words).
Incidentally, the author of tmux uses C-a in his primary sessions and always types C-a twice (whether in a tmux session or not). If you are willing to adopt this habit, it seems like a decent compromise since the second C-a should be a no-op in most Emacs-like editing contexts. It would not work so will if you often use programs/contexts outside of screen where the second C-a would not be a no-op.
By default, C-a C-a is bound to the other command (switch to most recently active screen) in screen. To have C-a C-a send an actual C-a and have C-a o switch windows, put the following in your .screenrc
:
escape ^A^A
bind o other
Have you looked at byobu its screen but with massive enhancements, You would still use one terminal but you get tabbed sessions so you can skip though the diffrent screens using the function keys. plus it gives you an nice dashboard.
Best Answer
Try adding this (from
/etc/screenrc
) to your~/.screenrc
:You may need to change the "xterm" to match your
$TERM
.The
termcapinfo
line setsis
(ininitialization string) for any terminal with a name starting with "xterm" to a sequence of escape codes.\E
representsescape
and the codes are as follows:The replaced line had these codes:
(source: XTerm Control Sequences)