View Single Post
  #11   Spotlight this post!  
Unread 05-11-2013, 14:50
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Is this Programmable with C++?

Quote:
Originally Posted by Alan Anderson View Post
It's possible to program the Dashboard to recognize keypresses...
Quote:
Originally Posted by Halo_Kid_3633 View Post
How do I go about doing this?
The relevant functions are in the Connectivity -> Input Device Control subpalette. Use the Initialize Keyboard vi to create a reference to the computer's keyboard. Pass that reference to the Acquire Input Data vi. The output of the Acquire will be an array containing all the keys that are currently pressed.

If you want to test for a specific key, you can feed the "keys pressed" array into a For Loop using auto-indexing. Each iteration of the loop will get one of the keys in the array. You can compare the detected key against a constant representing the key you are looking for.
Reply With Quote