Mouse support

Town, Brad btown@ceddec.com
Thu Nov 30 13:33:00 GMT 2000


Attached are patches that enable xterm-style mouse event reporting for
console windows.

To use mouse event reporting, make sure your console windows do not have
QuickEdit mode enabled.

To enable ncurses support for the mouse, add "kmous=\E[M" to your source
terminfo file and re-tic.  I've tested it with ncurses's main test program
"ncurses" and "knights" (an ncurses test program) as supplied by the Cygwin
ncurses distribution.

Issues:
. Instead of mouse support always being enabled (as it is now), it should be
enabled when the console receives \E[?1000h and disabled when the console
receives \E[?1000l.  (That's a lower-case 'L'.)
. Single-clicking and triple-clicking seem to work fine, but for ncurses's
"ncurses" program to see a double-click, you need to move the mouse
afterward.  I spent the better part of the afternoon looking for the cause,
but to no avail.

Brad Town

-------------- next part --------------
Thu Nov 30 16:04:26 2000  Bradley A. Town <townba@pobox.com>

	* fhandler_console.cc (fhandler_console::read): Added
	xterm-style mouse event reporting.
	(fhandler_console::open): Enabled mouse input events.
	(fhandler_console::input_tcsetattr): Ditto.
	* select.cc (peek_console): Added check for mouse events.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fhandler_console.cc.diff
Type: text/x-diff
Size: 5363 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20001130/955db029/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: select.cc.diff
Type: text/x-diff
Size: 622 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20001130/955db029/attachment-0001.bin>


More information about the Cygwin-patches mailing list