LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview 2014 not triggering Key down on Ctrl-V for Multicolumn Listbox

I just upgraded from 2012 to 2014 and am having trouble with a Vi that would fill in a Multicolumn Listbox with clipboard values on a Ctrl-V Key Down Event.

It seems that labview is no longer triggering the Ctrl-V event in the Multicolumn Listbox.  Anyone know if this is a feature of a bug? Any workarounds? I checked 2012 and 2013 both versions trigger a keydown event on Ctrl-V. I assume that this is to allow the system to paste in the control like the string control does now, but this would really mess up quite a few of my vi's that are designed to allow the user copy date from excel to a listbox.

I am attaching a simple testing Vi that shows this behavior on my machine.

Any Help? Thx

 

Brian Gauthier

0 Kudos
Message 1 of 4
(2,859 Views)

Brian,

 

This is the behavior that I see when running your example VI in 2014: "This VI" will always show both Ctrl and V keys. The string control and listbox only show the Ctrl key down

 

This is the behavior that I see when running your example VI saved for previous version in 2013: both "This VI" and the listbox show Ctrl and V key down. The string control only shows Ctrl keydown.

 

I will check to see if this is an intended change in behavior or not. Thanks.

Daniel C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,796 Views)

Brian,

 

I have confirmed that simultaneous key down event capture for "This VI" and "Listbox" is not expected to be consistent with each other. However it seems like in 2014 the listbox by itself is unable to capture any CTRL + key command. It only captures the CTRL and not the second key. I will keep looking into this.

 

A quick workaround to this would be to use the Opt boolean. When the CTRL key is pressed, the Opt boolean in the PlatMods cluster is set to true. When another keypress is detected, it returns to false. You could use this to detect a CTRL press, followed by a V press.

 

Thanks

Daniel C.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(2,762 Views)

Thanks Daniel, I do not think I am going to get that behavior I want with you work around since a typical "paste" in Windows is Ctrl+V and I am trying to replicate this behavior. It might confuse users to have to separate the ctrl and v press, especially since they are already using the ctrl-V to paste.  My current work around is to filter out the Ctrl-V at the "This-Vi" Event and determine which control is the focus object and handle it based on the control in focus, I do have to then discard the event to keep the "System" from pasting in a field of a table,  or a editable listbox, but it seems to work. I would say that this limit to the keydown capture seems to to me to take away from the the usfulness of having a keydown event for each control and requires me to rewrite a significant amout of code in order to migrate from LV2012 to 2014.

 

Let me know if you find out any more.

0 Kudos
Message 4 of 4
(2,732 Views)