Re: GET_KBRD()... behavior depends on OS properties? [message #39273] |
Mon, 10 May 2004 11:04 |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"Tim Robishaw" wrote...
> I use the CURSOR command a lot when investigating data... usually
> spectra and images. Once in a while I try to get clever like so: if I
> press a specific key (the output is returned via GET_KBRD(0)) then a
> related task is run. But I'd really like GET_KBRD() to work while
> the cursor is sitting in the spectrum or the image window... this way,
> my routines can use the (x,y) position that the cursor is sitting at.
Is there a reason you aren't using WIDGET_DRAW keyboard events (introduced
in 5.6)?
> Is there any way to force this behavior from inside IDL? I'm guesing
> probably not, but I'm hoping someone knows more about this than I do.
I don't think so, and certainly not in a platform independent way if that is
your goal.
While it may take a little work, modify your application so that you accept
your keyboard input via WIDGET_DRAW events. You will not have to deal with
focus issues and it will be platform independent.
-Rick
|
|
|