so i remapped some keys using xmodmap, specifically i remapped one key to the ±-sign. I want to have this key as my escape for GNU screen. I tried adding the following lines in my .screenrc:

escape ±

escape ±±

but it doesn't work.

from the GNU Screen manual:

escape xy

Set the command character to x and the character generating a literal command character (by triggering the "meta" command) 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 do not understand how the default mapping is ^a when the line in screenrc is ^Aa.

Can someone explain this please?

Thank You



^A means that the escape sequence is control-a

a means if i need to send control-a to my shell , i need to type control-a following by a

You can test by following this example

screen -e "^Ap"    #  start screen with escape set to ^Ap

bash               # to be sure we are in bash

set -o emacs       # we switch to emacs mode

echo hello         # we have some in history

control-p or arrow UP

your cursor must be at the end of the previous command must be echo hello

control-a follow by p

you cursor must be at the begin of the line ( you send ctrl-a to the shell )

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.