06-27-2008 02:11 PM
03-12-2012 04:52 PM
I have a question. I am currently handling a 14 case event structure. 12 cases are using booleans with 'Value Change' events handled by each case. (they work perfectly) Two cases need to invoke scan codes or use the 'Acquire Input data' vi from the 'Input device control pallet'. Why am I getting the "Duplicate event handlers are not allowed" error message when assigning just two cases to 'Key Up' by the two events handled differently??
03-12-2012 04:59 PM
...the bottom line is: I need two of the 14 events handled by scan codes or custom key strokes assigned to the vi itself or two different Booleans.
03-12-2012 05:42 PM
Post your VI!
03-13-2012 10:00 AM
03-13-2012 10:16 AM - edited 03-13-2012 10:19 AM
I wouldn't use the Acquire Input Data.vi. You are already capturing the button press by way of the Key Up event case.
In your Key Up event case, put a case structure that you wire the key code into. If the key code equals 18, do one thing. If it equals 45 do another. The default case (for all other key codes) does nothing.
Then you can have another couple of event cases that handle the Value change events for the buttons, each case doing what you need which would probably be identicaly code to what you put in the case structure of the Key Up event.
03-13-2012 10:47 AM
Actually, I could try consolidating the Key Up events as you suggest - good idea! Thank you. I am not sure if creating two Value change events would give me a conflict or not however. Are you suggesting I could OR the result of either Key up event case to its appropriate Value change?
03-13-2012 11:11 AM
Thank you! That works!