07-17-2012 03:33 AM
Hi,
I'm having difficulty with my VI, i have a "next" and a "previous" button (booleans). I want to fire the same event in the case when: the left or right arrow keys are pressed or when the next or previous buttons are pressed.
When i add all the events in one events case, i can't determine what key is pressed i get an event with all key presses, which is fine, but i realy need to know if the right or left arroy key is pressed.
Anyone,
Best regards,
Thijs Boeree
PS. i also want to a slider and want to control the slider with the next and previous buttons, but maybe that's another sort of question...
Solved! Go to Solution.
07-17-2012 03:48 AM
Hi Thijis,
I have modified your VI using two case structures.In this you can add any further modifications according to your requirement.
Hope this helps.
07-17-2012 03:59 AM
Hi ThijsBoeree
Hope the following VI will suit your requirment. In this VI, I am filtering the keys only for left and right.
Regards
Javed.
07-17-2012 05:56 AM
I am going to do it on antother way, but thanks for the help! I am going to register all my frontpanel objects first and then use references to them, and i am going to make several Event cases, with the same sub VI in it.
Best regards,
Thijs
01-29-2013 07:13 AM
Hi Javed,
your example code works well for this special problem. However, in most cases it will be not very usefull, since all pressed keys (except for the trigger keys "left" and "right") are dicarded. So, text input for example, is no longer possible.
Keep this in mind.
Best regards
transfererror