[Urwid] Re: urwid mouse support

Ian Ward ian at excess.org
Fri Mar 31 14:58:21 EST 2006


Larry Riedel wrote:

>Ian:
>
>
>[I wrote:]
>> It showed the button press and release correctly
>
>Oops, let me change that a little.  It correctly
>reported that a mouse release occurred and the
>location, but it always showed the button released
>as 0.  I do not know if you would consider that a
>bug; I would; but I have no idea if it is a bug in
>curses or what.
>
I think it's an xterm limitation. The codes xterm sends for mouse 
tracking are* :

0: button 1 pressed
1: button 2 pressed
2: button 3 pressed
3: any button released
64: button 4 (mouse wheel up) pressed
65: button 5 (mouse wheel down) pressed

So I can't tell which button was released.  On the linux console with 
GPM I can always detect which button was released, but I convert the gpm 
info to the xterm way of doing it, so I lose that information (That 
could be fixed, of course)

Ian

* see: http://rtfm.etla.org/xterm/ctlseq.html#mtrack




More information about the Urwid mailing list