LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard Controls

Solved!
Go to solution

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 🙂

0 Kudos
Message 1 of 14
(4,230 Views)

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.

0 Kudos
Message 2 of 14
(4,221 Views)

Sorry I forgot to attach what I've done

0 Kudos
Message 3 of 14
(4,217 Views)
-Also you can try the example provided along with labview for keyboard events.
Go to Help>>Find Examples>>Search for Keyboard.
-Can you post your vi in lv12 (File>>Save for Previous version) because i cannot open your vi.
Thanks
uday
Message 4 of 14
(4,197 Views)

I found the example but I think it wasn't useful for me.. I've attached my vi for lv12. 

 

Thanks! XD

0 Kudos
Message 5 of 14
(4,184 Views)
Solution
Accepted by topic author makewayforkhairil

ASCII from key down.png

 

Example for getting the keys pressed with events.

Message 6 of 14
(4,176 Views)

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...............

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Message 7 of 14
(4,152 Views)
Please keep timeout for event structure, otherwise when no key is pressed and you try to stop the vi, it will not stop.
Thanks
uday
Message 8 of 14
(4,134 Views)

@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.

0 Kudos
Message 9 of 14
(4,113 Views)

Hey I was wondering where can I get the circled symbol? XD

 

Thank you!original2.PNG

0 Kudos
Message 10 of 14
(4,083 Views)