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

Home » Public Forums » archive » Re: raw keyboard input in PVWAVE?
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: raw keyboard input in PVWAVE? [message #160] Wed, 23 October 1991 06:39
thompson is currently offline  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 Go to previous message
sterner is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: raw keyboard input in PVWAVE?
Next Topic: need constrained SVD code in IDL :)

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

Current Time: Wed Oct 08 19:15:18 PDT 2025

Total time taken to generate the page: 0.00842 seconds