Re: Not getting which mouse button is pressed on button-press-event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just tried it and verified most of the answer, via something I'm playing with;
UINT   ejEventManager::getButton  () {
   return currEvent.xbutton.button;
}

1 == Left mouse button
2 == Right mouse button
4 == scroll up
5 == scroll down

Wasn't able to emulate middle button on my 2-button mouse (project for another
day, perhaps).  Can't verify 6,7, but perhaps it's time for me to buy a better
mouse.  I wonder, though, if this might be useful with a joystick (left, right).

Ed James

On Wed, Jan 13, 2010 at 2:13 PM, Tadej Borovšak <tadeboro@xxxxxxxxx> wrote:
> Hello.
>
> You can get the mouse button pressed by looking at event->button
> field. 1 means left button, 2 middle button (which can usually be
> emulated by pressing right and left button at once on 2-button mouse),
> 3 right button. I think 4-7 mean wheel movement (check API docs for
> that, I'm not 100% sure).
>
> Tadej
>
> --
> Tadej Borovšak
> tadeboro.blogspot.com
> tadeboro@xxxxxxxxx
> tadej.borovsak@xxxxxxxxx
> _______________________________________________
> gtk-list mailing list
> gtk-list@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux