comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: testing for SHIFT key being pressed
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: testing for SHIFT key being pressed [message #11749] Fri, 15 May 1998 00:00
cmclean is currently offline  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 Go to previous message
davidf is currently offline  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/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PS file and annotate.pro?
Next Topic: testing for SHIFT key being pressed

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:31:34 PDT 2025

Total time taken to generate the page: 0.00619 seconds