1

I have GNU screen configured to use Ctrl+Space as the escape character. This means that Ctrl+SpaceSpace will send a literal Ctrl+Space to the process in the window. Also, Ctrl+Space Ctrl+Space is the mapping for "switch to next window."

So now I have a conundrum. When I hold down Ctrl and double tap space, that should be doing Ctrl+Space Ctrl+Space, and switching to the next window. Sometimes it does, and sometimes it doesn't.

When I fire up showkey -a to see what the window is receiving, when I type Ctrl+Space Ctrl+Space quickly, the result seems to be ^[ (the escape character). But, it's also sent a Ctrl+Space to screen itself, so that the next character I type is taken as screen command—making for extreme confusion.

Worst of all, it is not deterministically reproducible. Sometimes it works consistently (i.e. Ctrl+Space Ctrl+Space will switch windows no matter how fast I type it), and sometimes I have to type it slow or I get the behaviour described above (consistent for several minutes).

What could be causing Ctrl+Space Ctrl+Space to instead be sending Escape Ctrl+Space?

I am using MobaXterm on Windows 10, but GNU screen is actually running on a RHEL 7.5 host that I am logged into via SSH.

7
  • There's no such thing as a ^SPC character. What character (or sequence of character) does your terminal emulator send upon Ctrl+Space (press Ctrl+V Ctrl+Space outside of screen)? What value to you use as the escape setting in screen? Commented Aug 24, 2019 at 7:06
  • @StéphaneChazelas In terminals Ctrl-Space typically generates the NUL byte. Not sure about MobaXterm, though. Commented Aug 24, 2019 at 8:16
  • I thought CTRL-@ 0x00 was infact null, it comes before CTRL-A 0x01, etc - It was emacs that interprets ^@ as equal ^-SPC for the binding to set-mark, and it's grown from there and I believe @Stéphane Chazelas is correct CTRL-SPC isn't actually an ascii character, but ^-@ ^-A, ^-B, ... was used to be able to enter 0x00-0x1F on an ascii keyboard. @ = 0x40 A = 0x41, Commented Aug 24, 2019 at 8:48
  • 1
    Yes, ^@ is the usual "control" representation of NUL and it's true many terminals send NUL/^@ upon Ctrl+Space, Ctrl+@, Ctrl+Backtick, where the Ctrl modifier takes the lowest five bits of the character that would be sent without Ctrl. screen for its escape command seems to interpret "^ " the same as "^@" and mean NUL, so it's likely what the OP used, and what the OP's terminal sends. Commented Aug 24, 2019 at 8:58
  • When you type Ctrl+Space in sequence outside of screen, do you always see the same characters (presumablly ^@/NUL)? Commented Aug 24, 2019 at 9:10

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.