Re: testing for SHIFT key being pressed [message #11749] |
Fri, 15 May 1998 00:00 |
cmclean
Messages: 2 Registered: May 1998
|
Junior Member |
|
|
David Fanning (davidf@dfanning.com) wrote:
: Calum McLean (cmclean@holyrood.ed.ac.uk) writes:
: > Is there any mechanism for testing whether SHIFT is being pressed?
: > I have found the 'get_kbrd' command, which will do this for all the
: > alpha-numeric characters, but not SHIFT.
: >
: > My particular requirement is to be able to test for SHIFT & LEFT MOUSE
: > BUTTON being pressed simultaneously, to add 'preserve aspect ratio'
: > to a rubberband box routine.
: Alas, IDL doesn't permit this kind of functionality, although
: it has been asked for so often that it must be close to the
: top of the list by now. I usually implement this kind
: of functionality by using the left button for normal
: selection and the right button for "aspect" selection.
: Cheers,
: David
Thanks for the advice.
Unfortunately I have run out of mouse buttons - I guess I could 'toggle'
the function of the mouse buttons using key strokes, but this is messy.
This brings up another slight annoyance. There seems to be no
mechanism to emulate the middle mouse button. Many functions require
the presence of the middle button, including some routines supplied in
the IDL distribution, which I really don't feel I should have to modify.
If my Xterm emulator (Exceed) can emulate the middle mouse button, I
don't see why IDL can't.
Now that made me feel better!
Calum....
|
|
|
Re: testing for SHIFT key being pressed [message #11750 is a reply to message #11749] |
Fri, 15 May 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Calum McLean (cmclean@holyrood.ed.ac.uk) writes:
> Is there any mechanism for testing whether SHIFT is being pressed?
> I have found the 'get_kbrd' command, which will do this for all the
> alpha-numeric characters, but not SHIFT.
>
> My particular requirement is to be able to test for SHIFT & LEFT MOUSE
> BUTTON being pressed simultaneously, to add 'preserve aspect ratio'
> to a rubberband box routine.
Alas, IDL doesn't permit this kind of functionality, although
it has been asked for so often that it must be close to the
top of the list by now. I usually implement this kind
of functionality by using the left button for normal
selection and the right button for "aspect" selection.
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|