01-15-2012 08:46 AM
How do I capture those characters with acquire input data vi
@ or # or $? All those chars require Shift and another key to be pressed. But with this vi, when I press shift and another key, the character of this other key will not display.
For example for @, I have to press Shift + 2, but it doesn't work with this vi.
Need some help please.
01-16-2012 03:33 PM
Hi agyna,
I think the problem is that you aren't expanding the indicator that shows the keys pressed. It's actually an array, allowing you to display multiple simultaneous keystrokes. I've attached a simple example using the expanded indicator. To expand it in your VI, you just need to drag the bottom right corner until you see the two boxes appear.
I hope this solves your problem!
Regards,
Courtney L
Applications Engineer
National Instruments
01-16-2012 07:21 PM
Thanks, but the result of this is 2 Key instead of 1. For exemple if I want "@", I need to press" shift and 2". So the problem here is that whith labview I am not geting that character @, but I am getting 2 keys, "shift and 2".
01-17-2012 12:25 PM
Hey agyna,
Ah I understand your problem. The two characters output by the Acquire Input Data VI will uniquely identify all two-character presses. You need to add logic to combine these presses into something meaningful (ie, Shift + 2 = @). I've modified the last VI I sent you quite heavily to account for the following cases:
1) Only 1 key is pressed
2) Right Shift + (0-9) are pressed
3) Left Shift + (0-9) are pressed
The VI has an LED that will turn on if a key combo (ie, multiple keys) are hit simultaneously. It displays symbols !@#$%^&*(). You should be able to modify this VI to handle more cases if you need to.
Hope this helps.