public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Thomas Wolff <towo@towo.net>
To: cygwin@cygwin.com
Subject: Re: cygwin 3.1 pseudo console in PTY and break/ctrl-c handling
Date: Thu, 20 Feb 2020 09:11:00 -0000	[thread overview]
Message-ID: <7093c8eb-cb0f-eeee-2864-90923a206e98@towo.net> (raw)
In-Reply-To: <a10b0144-34b0-5ea7-31f7-acd5c94f275a@SystematicSw.ab.ca>

On 19.02.2020 21:21, Brian Inglis wrote:
> On 2020-02-19 13:02, Kevin Schnitzius via cygwin wrote:
>> On Tuesday, February 18, 2020, 05:54:23 PM EST, Thomas Wolff wrote:
>>>> With 3.1.2-1:
>>>> mintty -o "CA+F12:break"               =====>    ctrl-alt-F12 causes a break and kills notepad
>>>> mintty -o "c:break"                    =====>    ctrl-shift-c causes a break and kills notepad
>>>> mintty -o "C+c:break"                  =====>  FAIL -- ctrl-c kills native apps but notepad is not affected
>>>> mintty -o "CA+c:break"                 =====>  FAIL -- ctrl-alt-c kills native apps but notepad is not affected
>>> This would be mintty -o KeyFunctions='CA+F12:break' etc.
>>> The latter two are not valid mintty configuration; Ctrl is only
>>> supported as a modifier for function keys and special keys, not letters.
>>> This is unchanged with the cygwin version.
>> Ah, thank you.  That was the clue that I needed.
>>
>> For those also having this problem:
>>
>> mintty.exe -o "KeyFunctions=c:break" -o CtrlExchangeShift=true -
>>
>> will propagate Ctrl-C to the non-native apps and kill them, imitating the behavior of 3.0.X Cygwin.
>>
>> Now that I have played with this for a while, I am thinking that I like the new behavior better and I have assigned a new key to specifically kill native Windows programs instead letting the Ctrl-C do all the work (I am using Alt-F5 to do this).
> Should the above settings not be the default behaviour for backward
> compatibility and least surprise to users?
I was just taking up the requester's example. Sure ^C is an interrupt 
function on the command line. This is handled by the pty driver, not by 
the terminal.
The above configuration is a mintty feature of assigning functions (of 
which break is just one special case) to key combinations, independent 
of the stty settings.


> It used to be mintty just worked as expected with most programs, now additional
> interfaces seem to be required depending on Windows versions, editions, and
> releases. These helpers should either be included in the package, or be
> dependencies pulled in by mintty without which it will not install, with the
> appropriate interfaces installed and configured so that mintty, shells, and
> programs run under it continue to work as expected.
Some recently reported observations are related to the ConPTY project. 
There have been no changes in mintty concerning keyboard handling.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2020-02-20  9:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <937489593.4978154.1582060605719.ref@mail.yahoo.com>
2020-02-18 21:18 ` Kevin Schnitzius via cygwin
2020-02-18 21:30   ` Jose Isaias Cabrera
2020-02-18 22:54   ` Thomas Wolff
2020-02-19 20:02     ` Kevin Schnitzius via cygwin
2020-02-19 20:21       ` Brian Inglis
2020-02-20  9:11         ` Thomas Wolff [this message]
2020-02-20  0:32   ` Takashi Yano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7093c8eb-cb0f-eeee-2864-90923a206e98@towo.net \
    --to=towo@towo.net \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).