console enhancements: mouse events etc

Thomas Wolff towo@towo.net
Sun Dec 6 19:24:00 GMT 2009


Corinna Vinschen wrote:
> Could you please resend the latest version of your patch so we
> can have another look into it?
This is my updated and extended patch for a number of console enhancements.
> Christopher Faylor wrote:
>   
>> Can we hold of on applying this until after 1.7 is released?
>>     
Sure, feel free to apply when suitable. I just happened to work on it 
around this time...
> Yeah, maybe we really should do that for now.  Except for the
> ESC9m -> ESC2m change, maybe...
>   
If you want a subset of the features sooner than others, I may split the 
patch.


------------------------------------------------------------------------

The patch contains the following enhancements, all intended to increase 
compatibility with xterm and mintty (or rxvt in the case of modified 
function keys as it was desired to stay compatible with the linux console):

* Additional event reporting as described before:
  - Report mouse wheel scrolling in mode 1000.
  - Report mouse movement in new modes 1002 and 1003.
  - Report focus events in new mode 1004.
* Add and fix a few rarely used screen attributes as described before.
* Enable ESC prefixing for Alt-AltGr keys, so that e.g. Alt-@ works on 
keyboards where @ is AltGr-q.
* Extend escape sequences for modified function keys to indicate all 
combinations of Ctrl, Shift, Alt, using the rxvt codes.
* Extend escape sequences for modified keypad keys to indicate all 
combinations of Ctrl, Shift, Alt, following the xterm/mintty convention 
for Ctrl and Shift, and the rxvt/linux convention for Alt, to reach 
maximum compatibility.
  Note that Alt handling interfers with the Windows-style Alt-numeric 
character input method but it did so before already, so I didn't break 
anything. However, if that method is desired to work, I would modify my 
patch accordingly.
* Add VT100 graphics mode. It remaps small ASCII letters to line drawing 
graphics and is enabled / disabled in either of two ways:
        \033(0 jklmntuvwx \033(B
        \016 jklmntuvwx \017
  where the latter mode would normally be enabled with \033)0 but this 
is not required by my implementation (nor by mlterm); if guarding it by 
the enabling sequence is desired, I can easily add that.
* Fix cursor position reports and terminal status reports to work. Add 
"Secondary Device Attribute" report option to the latter.
  I implemented this with an additional static readahead buffer local to 
fhandler_console because the fhandler_base object buffer did not work as 
I described before.
  Side remark: While implementing this, I noticed that cygwin creates 37 
fhandler_console objects which I think is quite weird and probably not 
intended. Stdin is associated with object # 7 and stdout is always 
associated with the last one. Whenever bash redirects output to stderr, 
3 new objects are created.

There is only one feature missing now which I may try to implement later:
* Fix control-character mappings (for non-letter controls) on 
international keyboards.

Thomas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin-1.7.0-68-console-enhancements.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20091206/891c190a/attachment.ksh>


More information about the Cygwin-patches mailing list