One way of doing this is via a switch when you start screen. I think
this section of the Screen man pages applies to what you are asking
about:
---------------------
-e xy
specifies the command character to be x and the character generating a
literal command character to y (when typed after the command
character). The default is «C-a» and `a', which can be specified as
«-e^Aa". When creating a screen session, this option sets the default
command character. In a multiuser session all users added will start
off with this command character. But when attaching to an already
running session, this option changes only the command character of the
attaching user. This option is equivalent to either the commands
«defescape» or «escape» respectively.
----------------------
I invoked screen by using: screen -e ^Ww and confirmed that ^W was
the command character. So I could, for example, do ^W-? and get the
Help screen. Ctrl-A and then ? no longer worked.
You can also add the escape command to the .screenrc file, as
explained in the man pages:
---------------------
escape xy
Set the command character to x and the character generating
a literal command character (by triggering the "meta" com-
mand) to y (similar to the -e option). Each argument is
either a single character, a two-character sequence of the
form "^x" (meaning "C-x"), a backslash followed by an octal
number (specifying the ASCII code of the character), or a
backslash followed by a second character, such as "\^" or
"\\". The default is "^Aa".
---------------------
I put: escape escape ^Wq into my .screenrc and confirmed that it
took ^W as the command character instead of ^A. In your case, the
important thing is to put a blackslash in front of your desired
backslash character. Also, you will need to type the carat (^) and
not simply hit the control key when initially defining these new
command characters.
To be honest though, I haven't used Screen in a long time and I'm not
exactly certain what the second character (the y variable) in the
above cases do.
It looks like screen does an awful lot nowadays and you might want to
skim through the screen man pages by typing: man screen at a prompt
or by visiting this web page:
http://software.oit.pdx.edu/cgi-bin/hman-local?ManSection=1&ManTopic=screen
The manual pages describe a lot of the customization you can do to it.
It's possible that the version you are using (3.07.02) does not allow
you to change the default command character. In that case you might
look into getting a newer version installed.
I hope this information is helpful. If you would like for me to
clarify any part of my answer or further research your question,
please let me know before issuing a rating. Thanks!
leep-ga |