public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Small request for the new cygwin terminal
Date: Thu, 07 Jun 2012 19:12:00 -0000	[thread overview]
Message-ID: <CAHWeT-aS7QVDCjBMqUtn=B3zpRzqY9u7m6WuG56ZFqQ=wy4Erw@mail.gmail.com> (raw)
In-Reply-To: <op.wfji72pkofd6j1@nebbiolo>

On 7 June 2012 17:10, Helmut Karlowski wrote:
> Helmut Karlowski, 07.06.2012 17:52:43:
>
>
>> Nellis, Kenneth, 07.06.2012 16:56:57:
>>
>>> -----Original Message-----
>>> From: Andy Koppe
>>> <snip/>
>>> It is done on purpose, to allow Shift+Esc to be bound to a different
>>> function if desired. It's documented here:
>>>
>>> [1] http://code.google.com/p/mintty/wiki/Keycodes#Special_keys
>>>
>>> Shift+ESC sends the Unicode codepoint U+009B, aka the Control Sequence
>>> Introducer (CSI) character.
>>> <snip/>
>>> -----END Original Message-----
>>>
>>> My experience does not agree with the "Special keys" table at the
>>> page referenced by that URL.
>>
>>
>> On my german keyboard I receive ^[^[ (2x ESC) for Shift-ESC. Character Set
>> is CP850 if that matters. As of my understanding CSI is something like ESC[
>> (at least on an ANSI-terminal, is this different on xterm?).
>
>
> Switching to ISO-8859-1 emits 0x9b which seems to be correct.

See the preceding section on the wiki page:

http://code.google.com/p/mintty/wiki/Keycodes#Ctrl

"If Shift is held in addition to a control character combination, the
corresponding character from the so-called C1 control character set is
sent. The C1 control characters are shown as Unicode codepoints in the
table below. How exactly C1 control characters are sent depends on the
selected character encoding. In ISO-8859 encodings, they are encoded
as single bytes, e.g. \x81 for U+0081. With UTF-8, they are encoded as
two-byte sequences, which effectively means that the character code is
prefixed with a \xC2 byte, so for example U+0081 becomes \xC2\x81. C1
codepoints that are not supported by the selected character encoding
are sent by prefixing the corresponding ASCII control character with
an ESC character, so U+0081 would be sent as ^[^A."

CP850 doesn't support the C1 control characters, so you get the
fallback instead, which is the scheme for encoding the Meta modifier
when bit 7 isn't available. This means that Ctrl+Shift+letter
combinations can't be distinguished from Ctrl+Alt+letter, but since
Ctrl+Alt+letter combinations are suppposedly reserved for global
shortcuts in Windows, they might still come in handy occasionally.

There indeed is another scheme of encoding C1 control characters with
an ESC followed by the base character, e.g. ^[A instead of ^[^A, but
that would have made the Ctrl+Shift+letter keycode the same as
Alt+letter rather than Ctrl+Alt+letter, which is why I chose the Meta
scheme.

I hope that makes some sense.

Andy

--
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:[~2012-06-07 19:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07  8:41 Lluís Batlle i Rossell
2012-06-07 11:22 ` Andy Koppe
2012-06-07 14:59   ` Nellis, Kenneth
2012-06-07 15:52     ` Helmut Karlowski
2012-06-07 16:10       ` Helmut Karlowski
2012-06-07 19:12         ` Andy Koppe [this message]
2012-06-07 20:13           ` Helmut Karlowski
2012-06-08  3:57             ` Andy Koppe
2012-06-07 18:45     ` Andy Koppe
2012-06-08 18:02       ` Nellis, Kenneth
2012-06-08 19:18         ` Andy Koppe
2012-06-11 12:55           ` Nellis, Kenneth
2012-06-11 20:07             ` Helmut Karlowski
2012-06-12  4:23               ` Andy Koppe
2012-06-12  4:21             ` Andy Koppe
2012-06-12 13:11               ` Nellis, Kenneth
2012-06-15 12:16                 ` Andy Koppe
2012-06-08 12:54 Helmut Karlowski
2012-06-08 19:14 ` Andy Koppe

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='CAHWeT-aS7QVDCjBMqUtn=B3zpRzqY9u7m6WuG56ZFqQ=wy4Erw@mail.gmail.com' \
    --to=andy.koppe@gmail.com \
    --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).