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
(2,863 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
(2,854 Views)

Sorry I forgot to attach what I've done

0 Kudos
Message 3 of 14
(2,850 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
(2,830 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
(2,817 Views)
Solution
Accepted by topic author makewayforkhairil

ASCII from key down.png

 

Example for getting the keys pressed with events.

Message 6 of 14
(2,809 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
(2,785 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
(2,767 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
(2,746 Views)

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

 

Thank you!original2.PNG

0 Kudos
Message 10 of 14
(2,716 Views)