public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Ctrl+Space not working under Windows Terminal
@ 2022-09-03  1:33 Ricardo Urbina
  2022-09-04 15:48 ` Ken Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Urbina @ 2022-09-03  1:33 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 844 bytes --]

Hi, I'm trying out Cygwin's Zsh within Windows Terminal because WT
integrates better with WSL, but Cygwin beats it for working on the Windows
side.

However, I launched emacs and eventually noticed that Ctrl+Space doesn't
work when running under Windows Terminal. It doesn't work on jmacs, and
using a cygport of sendkey reveals that sendkey never gets the keypress.

I tried the old Console (cmd.exe) and ctrl+space doesn't work there either.
It works perfectly fine on Mintty though.

I asked about this on Windows Terminal's GitHub, and they tell me it's most
likely because Cygwin behaves differently with Mintty.

Is this a known issue, the Ctrl+Space not working on Windows Terminal? Is
there a known workaround?

Maybe I can access the WSL console from Mintty? As in directly, not via
ssh. That would be enough.

Thank you for your help

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ctrl+Space not working under Windows Terminal
  2022-09-03  1:33 Ctrl+Space not working under Windows Terminal Ricardo Urbina
@ 2022-09-04 15:48 ` Ken Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Ken Brown @ 2022-09-04 15:48 UTC (permalink / raw)
  To: cygwin

On 9/2/2022 9:33 PM, Ricardo Urbina wrote:
> Hi, I'm trying out Cygwin's Zsh within Windows Terminal because WT
> integrates better with WSL, but Cygwin beats it for working on the Windows
> side.
> 
> However, I launched emacs and eventually noticed that Ctrl+Space doesn't
> work when running under Windows Terminal.

It works on my system.  Here's what I did:

1. Start Windows Terminal and run

   /path/to/cygwin/bin/zsh -l

2. Launch emacs:

   emacs-basic -Q

3. Within emacs, type

   C-h k C-SPC

I then see "C-@" echoed in the minibuffer, and the resulting *Help* buffer says

   C-@ runs the command set-mark-command (found in global-map), which
   is an interactive compiled Lisp function in ‘simple.el’.

   It is bound to C-@, C-SPC.

And typing C-SPC does indeed set the mark.

I'm not sure what's different on your system.  Could there some be some setting 
that's causing C-SPC to be eaten by Windows Terminal instead of being sent to 
emacs as C-@?

By the way, if I run emacs-w32 instead of emacs-basic, everything is the same 
except that in the first line of the *Help* buffer "C-@" is replaced by "C-SPC". 
  So emacs-w32 is actually seeing the C-SPC keypress.

Have you tried emacs-w32 to see if that works better for you?

Ken

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ctrl+Space not working under Windows Terminal
@ 2022-09-06 15:28 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
  0 siblings, 0 replies; 5+ messages in thread
From: Lavrentiev, Anton (NIH/NLM/NCBI) [C] @ 2022-09-06 15:28 UTC (permalink / raw)
  To: cygwin

> Cygwin also generates NUL:

Thanks for checking!  NULs were used as fill characters to throttle down the line speeds, and were supposed to be ignored
in both hardware and software...  I guess with the software terminal emulators (such as MinTTY/Windows console/and such), that depends
on settings as to what is passed through to the applications, and what is just dropped and ignored...  So checking the terminal properties
may be indicated in this case.  Also, Windows console seems to have "Enable Ctrl-key" property that is said to possibly interfere with
the applications -- and maybe Ctrl-Space is one of those keys, so try to uncheck it to see if that helps.

Anton Lavrentiev
Contractor NIH/NLM/NCBI


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ctrl+Space not working under Windows Terminal
  2022-09-06 14:26 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
@ 2022-09-06 14:48 ` Christian Franke
  0 siblings, 0 replies; 5+ messages in thread
From: Christian Franke @ 2022-09-06 14:48 UTC (permalink / raw)
  To: Lavrentiev, Anton (NIH/NLM/NCBI) [C], cygwin

Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote:
>> I then see "C-@" echoed in the minibuffer, and the resulting *Help* buffer says
> WFIW, in the DEC VT terminals (from where most of ANSI controls stem from), Ctrl-Space used to
> generate a NUL character (ASCII '\0'), and so maybe it is seen as a fill character by the OP's
> terminal and, therefore, is ignored.

Cygwin also generates NUL:

$ od -t x1
1[Ctrl+Space]2[Ctrl+Space][Ctrl+Space]3[Return]
[Ctrl+D]
0000000 31 00 32 00 00 33 0a
...



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ctrl+Space not working under Windows Terminal
@ 2022-09-06 14:26 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
  2022-09-06 14:48 ` Christian Franke
  0 siblings, 1 reply; 5+ messages in thread
From: Lavrentiev, Anton (NIH/NLM/NCBI) [C] @ 2022-09-06 14:26 UTC (permalink / raw)
  To: cygwin

> I then see "C-@" echoed in the minibuffer, and the resulting *Help* buffer says

WFIW, in the DEC VT terminals (from where most of ANSI controls stem from), Ctrl-Space used to
generate a NUL character (ASCII '\0'), and so maybe it is seen as a fill character by the OP's
terminal and, therefore, is ignored.

Anton Lavrentiev
Contractor NIH/NLM/NCBI


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-06 15:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-03  1:33 Ctrl+Space not working under Windows Terminal Ricardo Urbina
2022-09-04 15:48 ` Ken Brown
2022-09-06 14:26 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2022-09-06 14:48 ` Christian Franke
2022-09-06 15:28 Lavrentiev, Anton (NIH/NLM/NCBI) [C]

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).