This is the mail archive of the
mailing list for the Cygwin project.
Re: mintty and Control-` , Control-~
- From: Andy Koppe <andy dot koppe at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 20 Apr 2013 21:14:44 +0100
- Subject: Re: mintty and Control-` , Control-~
- References: <CADd11yXqNrSfOEj4Lmf5KyVUL0TWkosEb=3yNprCyLLk_PK-iQ at mail dot gmail dot com> <514B2CEF dot 3090100 at cs dot utoronto dot ca>
On 21 March 2013 15:53, Ryan Johnson wrote:
> On 21/03/2013 11:30 AM, Igor Bukanov wrote:
>> It seems that mintty in Cygwin under Windows-7 does not pass C-`
>> (Control-backtick, in US keyboard this is the key above the tab) nor
>> C-~ (or Control-Shift-backtick) to terminal applications. Any reason
>> for that?
> A quick test  in shortcut override mode  suggests that mintty never
> receives that key combination in the first place.
Nah, it does receive it alright. Well, for me anyay. Shortcut override
mode only affects combinations that mintty normally uses for its own
purposes, for example Shift+Insert for paste.
> However, trying the same test in xterm, I get \000 and \036 for C-` and C-~,
> respectively. Neither of those seems to be correct  (\000 is ^@ and \036
> is ^^)
Indeed. Backtick and tilde don't directly correspond to control
characters, so mintty doesn't send anything for them.
What you can do is enable the so-called modifyOtherKeys mode (which
comes from xterm), in which case mintty sends the keycodes specified
on the following page for combinations that don't have a standard
The following will enable modifyOtherKeys mode level 1:
$ echo -ne '\e[>4;1m'
There's also a level 2, in which those special keycodes are sent even
for standard combinations such as Ctrl+letter.
$ echo -ne '\e[>4;2m'
> but it's still odd that xterm can receive key codes that mintty misses.
I guess I decided not to support those keycodes for Ctrl+` and Ctrl+~
because they're not intuitive and they just send the same as Ctrl+@
and Ctrl+^ (and also Ctrl+Space and Ctrl+Enter) anyway.
In order to make them useful without enabling modifyOtherKeys mode,
how about if Ctrl combinations with backtick (ASCII 0x60), opening and
closing brace (0x7B and 0x7D), pipe (0x7C), and tilde (0x7E) were
mapped to C1 control characters (in the U+0080 to U+009E range).
Incidentally, on US and UK keyboards (and others) that's what already
happens for the braces and pipe symbol, because for example the pipe
symbol is typed with Shift+\, and mintty maps Ctrl+Shift+\ to U+009C
as explained at http://code.google.com/p/mintty/wiki/Keycodes#Ctrl.
I hope I've suitably confused matters now.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple