console enhancements: mouse events
Corinna Vinschen
corinna-cygwin@cygwin.com
Sat Nov 7 10:08:00 GMT 2009
On Nov 6 21:55, Andy Koppe wrote:
> 2009/11/6 Thomas Wolff:
> > * I would like to fix some key assignments:
> > Â - Control-(Shift-)6 inputs Control-^ which is not proper on international
> > Â Â keyboards if Shift-6 is not "^", Control-^ (the key) does not input
> > Â Â Control-^ (the character) on the other hand; the same glitch
> > Â Â occurs in the pure Windows console, however.
> > Â Â Unfortunately, with the functions being used it is not possible to
> > Â Â detect that shifted key "^" was hit together with Control; only
> > Â Â keycodes/scancodes are available when Control/Shift/Alt are used. So
> > Â Â I don't know whether this can easily be fixed. It works in mintty but
> > Â Â I think mintty uses different Windows functions.
>
> Mintty roughly does the following for Ctrl(+Shift)+symbol combinations:
> - obtain the keymap using GetKeyboardState()
> - set the state of the Ctrl key to released
> - invoke ToUnicode() to get the character code according to the keyboard layout
> - if the character code is one of [\]_^? send the corresponding control code
> - otherwise, set the state of both Ctrl and Alt to pressed (this is
> equivalent to AltGr), and try ToUnicode() again
>
> The last step means that e.g. Ctrl+9 on a German keyboard will send
> ^]. The proper combination would be Ctrl+AltGr+9, but since
> AltGr==Ctrl+Alt, that can't be distinguished from AltGr+9 without
> Ctrl. (Well, not without somewhat dodgy trickery anyway.)
How does that work for ^^? The ^ key is a deadkey on the german keyboard
layout, so the actual char value is only generated after pressing the key
twice. Just curious.
> Btw, ^[, ^], and ^\ are actually available as Ctrl+ü, Ctrl+plus, and
> Ctrl+# in the German keyboard layout, but those combinations make no
> sense unless you're familiar with the US layout.
Indeed.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
More information about the Cygwin-patches
mailing list