12-09-2013 09:42 PM
Hi. I just started using LabVIEW and I am currently using NI LabVIEW 2013 to control a quadcopter by using keyboard. I can only use certain buttons on my keyboard to toggle the buttons. Is there a way for me to for example use letters "w/a/s/d" to control my buttons?
Thank you 🙂
Solved! Go to Solution.
12-09-2013 09:54 PM
Use an event structure to detect the Key down and key up events. Look at what key is pressed by the event data node inside the event case.
12-09-2013 10:03 PM
Sorry I forgot to attach what I've done
12-09-2013 10:35 PM
12-10-2013 12:34 AM
I found the example but I think it wasn't useful for me.. I've attached my vi for lv12.
Thanks! XD
12-10-2013 12:52 AM
Example for getting the keys pressed with events.
12-10-2013 02:30 AM - edited 12-10-2013 02:30 AM
Use Raloks event structure, then just add a case structure for the different keys.
Remember chars are: w,s,d,f,g,h,j,k,l...............
vkeys are: Up, Down, Ctrl, Return...............
12-10-2013 05:07 AM
12-10-2013 11:49 AM
@udka wrote:
Please keep timeout for event structure, otherwise when no key is pressed and you try to stop the vi, it will not stop.
Ideally, the Stop button should have a value change event case in the structure to handle that.
12-10-2013 09:21 PM - edited 12-10-2013 09:22 PM
Hey I was wondering where can I get the circled symbol? XD
Thank you!