On Wed, Oct 04, 2006 at 04:04:29PM +0200, Markus Armbruster wrote:
>
> The xenkbd protocol provides for three mouse buttons. From xenkbd.h:
>
> __u8 button; /* the button (0, 1, 2 is right, middle, left) */
>
> This is extensible as long as we handle unknown buttons gracefully. I
> do hate the weird encoding of buttons, though. Too hebrew for my
> taste.
>
> SDL provides for five buttons (SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE,
> SDL_BUTTON_RIGHT, SDL_BUTTON_WHEELUP, SDL_BUTTON_WHEELDOWN).
>
> LibVNCServer provides for 8 buttons.
>
> The kernel input layer provides for 8 mouse buttons (BTN_LEFT,
> BTN_RIGHT, BTN_MIDDLE, BTN_SIDE, BTN_EXTRA, BTN_FORWARD, BTN_BACK,
> BTN_TASK).
>
> How to best map buttons from VNC and SDL to input beyond the first
> three? If we can find a workable answer for that, providing for more
> buttons should be trivial.
Not sure why LibVNCServer bothers to go to the trouble of defining
named constants for mouse buttons, since interpretation is really
dependant on the mouse the user has plugged in & VNC protocol doesn't
care about named roles for buttons.
VNC rfb protocol allows for 8 buttons, and just documents the regular
X11 conventions[1]
"On a conventional mouse, buttons 1, 2 and 3 correspond to the
left, middle and right buttons on the mouse. On a wheel mouse,
each step of the wheel upwards is represented by a press and
release of button 4, and each step downwards is represented by
a press and release of button 5."
For VNC, it would seem we should/can just pass buttons 1-8 straight
though the whole stack with no need for funky mappings. The wire
protocol for VNC is just a U8 bitmask of buttons which are pressed.
Regards,
Dan.
[1] Page 23 http://realvnc.com/docs/rfbproto.pdf
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|