Re: raw keyboard input in PVWAVE? [message #160] |
Wed, 23 October 1991 06:39 |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
In article <1991Oct22.184723.19365@news.yale.edu>,
leydon%bruce.decnet@venus.ycc.yale.edu (Gary Leydon) writes...
> I would like to know if there is a way to get "raw" keyboard input from inside
> a wave procedure or function.
In IDL there is the function GET_KBRD. I assume the same function is in
PV-WAVE. Calling CHAR = GET_KBRD(1) waits for the user to enter a key at the
keyboard. Calling CHAR = GET_KBRD(0) doesn't wait, but returns the first
character in the type-ahead buffer, if any.
Bill Thompson
|
|
|
Re: raw keyboard input in PVWAVE? [message #161 is a reply to message #160] |
Tue, 22 October 1991 14:39  |
sterner
Messages: 106 Registered: February 1991
|
Senior Member |
|
|
leydon%bruce.decnet@venus.ycc.yale.edu (Gary Leydon) writes:
> I would like to know if there is a way to get "raw" keyboard input from inside
> a wave procedure or function. I'm running wave on a vaxstation 3200 running
> decwindows and I would like to allow the user to cancel input by hitting a
> single key (e.g. escape) or provide command key equivalents to menu selections.
> All the wave input routines just poll the keyboard and wait for the user to
> hit return before you can examine the input. Is there a way to get async
> input from wave via the call_vms routine?
> Any hints would be greatly appreciated
> Gary leydon
> bitnet Leydon@yalemed
> Internet Leydon%bruce.decnet@venus.ycc.yale.edu
IDL has a function called GET_KBRD, maybe PV~Wave does too. I
commonly use a statement like:
if strupcase(get_kbrd(0)) eq 'A' then return
which just checks to see if the A key has been pressed, but doesn't
wait for input. The strupcase makes the input case insensitive.
Ray Sterner sterner%str.decnet@warper.jhuapl.edu
Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
|
|
|