You are not logged in.

#1 2007-04-26 18:53:06

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Binding Alt - Space as escape in Screen

I entered cat and pressed this key combo to get the appropriate escape sequence, which was '^[ ' (can I call that an escape sequence?! It doesn't have a backslash in...). Attempting to map this in .screenrc using

escape "^[ "

doesn't work though. *looks glum*

I've also searched the termcap and terminfo man pages, and haven't found the escape sequence. Looking through the vt100 manual is taking forever. stty isn't any use, or at least I haven't figured out how I can deduce this info from it, despite trying several flags.

- KD

Last edited by KomodoDave (2007-04-27 01:09:00)

Offline

#2 2007-04-27 01:24:50

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Re: Binding Alt - Space as escape in Screen

I've finally found the octal code for it here. But doing

escape \\071

doesn't work, and nor does any permutation involving more/fewer backslashes. Yet if that's the right octal code, surely the bind should work...

- KD

Last edited by KomodoDave (2007-04-27 03:12:26)

Offline

#3 2007-04-27 03:54:04

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Binding Alt - Space as escape in Screen

Well, screen wants only a single \ before an octal code. Also, 71 is the digit 9.

EDIT: It looks like Alt would require you to send NUL followed by octal 71. Would you settle for ctrl+space? Putting "escape "^  " will accomplish that one.

BTW, screen interprets ^[ as control+[.

Last edited by pauldonnelly (2007-04-27 04:01:18)

Offline

#4 2007-04-27 07:32:23

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Re: Binding Alt - Space as escape in Screen

pauldonnelly wrote:

Well, screen wants only a single \ before an octal code. Also, 71 is the digit 9.

EDIT: It looks like Alt would require you to send NUL followed by octal 71. Would you settle for ctrl+space? Putting "escape "^  " will accomplish that one.

BTW, screen interprets ^[ as control+[.

Thanks for replying, Paul.

Sadly I use Ctrl-space for ratpoison, so wish to retain alt-space for screen.

- KD

Offline

#5 2007-04-27 17:42:10

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Re: Binding Alt - Space as escape in Screen

pauldonnelly wrote:

Well, screen wants only a single \ before an octal code. Also, 71 is the digit 9.

EDIT: It looks like Alt would require you to send NUL followed by octal 71. Would you settle for ctrl+space? Putting "escape "^  " will accomplish that one.

BTW, screen interprets ^[ as control+[.

Ok, so I decided to go for Ctrl-Space since it's easy enough to switch ratpoison to use Alt-Space, fortunately.

However, I can't get Ctrl-Space to work in Screen now!

I tried putting

escape "^ "

in my .screenrc, and it doesn't work. I also tried these:

escape "^\ "
escape "^@"

and neither works (the second I got from trying the key combo in cat).

I know for certain the rest of my .screenrc is fine, and I had phrakture's bind of 'escape ^\\\' before, which worked perfectly.

What on earth am I doing wrong?! lol.

- KD

Last edited by KomodoDave (2007-04-27 17:43:01)

Offline

#6 2007-04-27 19:35:38

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Binding Alt - Space as escape in Screen

You need to have two spaces after the caret, not one. Screen is failing to assign the key because it expects another character, but it's not telling you. I think.

Offline

#7 2007-04-27 19:47:49

KomodoDave
Member
From: Oxford, UK
Registered: 2007-04-22
Posts: 162
Website

Re: Binding Alt - Space as escape in Screen

pauldonnelly wrote:

You need to have two spaces after the caret, not one. Screen is failing to assign the key because it expects another character, but it's not telling you. I think.

I love you.

- KD

Offline

Board footer

Powered by FluxBB