console enhancements: mouse events

Andy Koppe andy.koppe@gmail.com
Mon Nov 9 07:46:00 GMT 2009


Thomas Wolff:
>>>  Note: This works on my home PC (Windows XP Home) but it's not effective
>>>  on my work PC (Windows XP Professional) where the mouse wheel scrolls the
>>>  Windows console (which it doesn't on the other machine); I don't know  how
>>> to disable or configure this.

I've come across a similar issue in mintty: on some machines, if the
scrollbar is enabled, mousewheel events never reach the window's event
loop. I never really got to the bottom of it, but I think it's to do
with mouse drivers: some appear to send mousewheel events straight to
a window's scrollbar if there is one, no matter where in the window
the mouse is positioned.

>> [Ctrl+AltGr+key stuff]

> Thanks Andy for pointing to the part of mintty code handling this. However,
> the whole function there looks too complex for a quick copy-paste-patch.

Nested functions, big switches, and even a couple of gotos, that
function has it all. ;)

> Maybe later... or Andy might like to factor out the mapping part in a way
> directly reusable for the cygwin console?

Erm, no. The crucial subfunction there is undead_keycode().

> It
> does not work however, even for ASCII characters, for characters produced
> with AltGr, e.g. Alt-AltGr-Q where AltGr-Q is @ (German keyboard). Andy got
> this to work in mintty (I think with some other subtle trick after I
> challenged him for it IIRC); it does not work in xterm either.

You can tell whether both Alt and AltGr are down by checking VK_LMENU
and VK_RMENU.

Andy



More information about the Cygwin-patches mailing list