Re: Not getting which mouse button is pressed on button-press-event
- From: Ed James <edward james gmail com>
- To: gtk-list gnome org
- Subject: Re: Not getting which mouse button is pressed on button-press-event
- Date: Wed, 13 Jan 2010 15:11:21 -0500
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 gmail com> 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 gmail com
> tadej borovsak gmail com
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]