X-Recipient: archive-cygwin AT delorie DOT com 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 MIME-Version: 1.0 In-Reply-To: References: <0D835E9B9CD07F40A48423F80D3B5A70C799 AT USA7109MB022 DOT na DOT xerox DOT net> Date: Thu, 7 Jun 2012 20:12:05 +0100 Message-ID: Subject: Re: Small request for the new cygwin terminal From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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