Re: GET_KBRD(0) doesn't work in Windows NT [message #9866] |
Fri, 29 August 1997 00:00 |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
Liam Gumley wrote:
> Under IDL 5.0.2 on my SGI Unix box, the following code will keep
> displaying the message until a key is pressed.
>
> while get_kbrd(0) eq '' do print, 'Press any key to stop'
>
> Under IDL 5.0.2 on a PC running Windows NT 3.51, pressing a key has no
> effect - I have to kill IDL to get out of the loop.
>
> Is this a well known problem with GET_KBRD()? If so, how do I get a
> single keypress in Windows?
It turns out that I was pressing the 'Enter' key, and this is what caused
IDL to stop responding in NT 3.51. The online help does warn against
trying to get keypresses from control keys, but I guess I was used to
getting keypress events from the 'Enter' key in Unix, and I was expecting
it to work under NT (silly me). Keypresses from normal alphanumeric keys
seem to work as expected.
Cheers,
Liam.
|
|
|
Re: GET_KBRD(0) doesn't work in Windows NT [message #9876 is a reply to message #9866] |
Wed, 27 August 1997 00:00  |
Thomas Bruckbauer
Messages: 1 Registered: August 1997
|
Junior Member |
|
|
Liam Gumley <liam.gumley@ssec.wisc.edu> wrote in article
<3402E2B3.A9DA971F@ssec.wisc.edu>...
> Under IDL 5.0.2 on my SGI Unix box, the following code will keep
> displaying the message until a key is pressed.
>
> while get_kbrd(0) eq '' do print, 'Press any key to stop'
>
> Under IDL 5.0.2 on a PC running Windows NT 3.51, pressing a key has no
> effect - I have to kill IDL to get out of the loop.
>
> Is this a well known problem with GET_KBRD()? If so, how do I get a
> single keypress in Windows?
>
Hi,
I was curious and tested this on my machine (WinNT 4.0 service pack 3, IDL
5.0.2):
it behaves as expected!
???
I do not know of any setting in IDL that could cause this problem, so maybe
it is NT 3.51?
Thomas
|
|
|