LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard in Labview

Hi,

I want to my program to take some action when the space-key is
pressed, but I can´t figure out a way to test if a key (and which one)
is pressed. So I would like to know if there is any way to check for
a pressed key in Labview (win 95).

Thanks for your help in advance,
Alexander
------------------------------------------------------------------------
Alexander Stapff e-mail: Alexander.Stapff@post.rwth-aachen.de
RWTH-Aachen (Student)
Aachen, Germany
PGP Public-Key available on request
------------------------------------------------------------------------
0 Kudos
Message 1 of 5
(4,593 Views)
> I want to my program to take some action when the space-key is
> pressed, but I can´t figure out a way to test if a key (and which one)
> is pressed. So I would like to know if there is any way to check for
> a pressed key in Labview (win 95).
>

There are VIs on the NI ftp site for reading the keyboard. You log into
the ftp site at ftp.natinst.com with account as anonymous and password
as your email address. Then cd to support/labview/vis/windows/31 or
something close to that. They will work for versions 3.1 and greater.

Another neat trick, the user can't type into anything else on the panel,
is to make two string controls. Use the attribute node to set the
key focus to one control, and then the other at say 50Hz. Then read the
terminal for the controls and see
what their value is. Swapping the
focus will force the entry of pretty much each key, and you can then
check each for a space or whatever key you are looking for. This trick
isn't really ever useful since the keyboard VIs exist, but like I said,
it is a clever workaround.

Greg McKaskle
0 Kudos
Message 2 of 5
(4,595 Views)
0 Kudos
Message 3 of 5
(4,282 Views)

Anu rvk,

There are several options : you are either
  1/ an historian
  2/ a pre-historian
  3/ a paleontologist

Before answering, check the date of the post... :D:D:D

Message Edité par chilly charly le 01-09-2006 01:26 PM

Chilly Charly    (aka CC)
Message 4 of 5
(4,273 Views)

Hey CC,

That's okay.  The link may help someone else..

😄

 
 
 
 
 
 
 
 
 
 
 
 
>>>>  okay.......  ..............  maybe not..........  😉

Message Edited by JoeLabView on 01-09-2006 08:23 AM

Message 5 of 5
(4,259 Views)