From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13051 invoked by alias); 7 Jun 2012 19:12:20 -0000 Received: (qmail 13029 invoked by uid 22791); 7 Jun 2012 19:12:19 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ee0-f43.google.com (HELO mail-ee0-f43.google.com) (74.125.83.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Jun 2012 19:12:06 +0000 Received: by eeke50 with SMTP id e50so452320eek.2 for ; Thu, 07 Jun 2012 12:12:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.96.10 with SMTP id q10mr1860130eef.14.1339096325223; Thu, 07 Jun 2012 12:12:05 -0700 (PDT) Received: by 10.216.170.149 with HTTP; Thu, 7 Jun 2012 12:12:05 -0700 (PDT) In-Reply-To: References: <0D835E9B9CD07F40A48423F80D3B5A70C799@USA7109MB022.na.xerox.net> Date: Thu, 07 Jun 2012 19:12:00 -0000 Message-ID: Subject: Re: Small request for the new cygwin terminal From: Andy Koppe To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-06/txt/msg00123.txt.bz2 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 >>> >>> 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. >>> >>> -----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