Re: XForms: How to detect SHIFT <Mouse Button> ?

Frank van Beek (frank@neogeo.nl)
Wed, 2 Jul 1997 13:04:05 -0600

To subscribers of the xforms list from "Frank van Beek" <frank@neogeo.nl> :

On Jul 2, 9:56am, Ivan Powis wrote:
> Subject: XForms: How to detect SHIFT <Mouse Button> ?
> To subscribers of the xforms list from Ivan Powis
<pczip@chemistry.nottingham.ac.uk> :
>
> I'm using a post-emptive handler to add some interactive functionality
> to xyplot ( along the lines of DEMOS/xyplotall.c ). The 'key' value
> which gets returned to this handler accurately reflects which mouse
> button was pressed, but I'd like to be able to provide modified
> response by using eg keyboard SHIFT + LEFT MOUSE BUTTON.
>
> Neither 'key' (nor fl_mouse_button used in a callback) seem to give
> any indication as to the concurrent status of SHIFT, ALT etc key
> modifiers. Can this be accomplished, and if so how?
>

I use:

FL_Coord x,y;
unsigned int keymask;

fl_get_mouse(&x, &y, &keymask);
if (keymask & ShiftMask) {
do_your_special_thing();
}

But there might be better ways to do this.

Frank.

-- 
| Frank van Beek          -     NeoGeo Videographics |
| Stratumsedijk 2a        -        5611 ND Eindhoven |
| The Netherlands         -  e-mail: frank@neogeo.nl |
| voice: (+31) 40 2126588 -    fax: (+31) 40 2125776 |
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/