LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW numeric control does not trigger value changed event when Enter key is hit

Solved!
Go to solution

The Boolean is what I used to create the issue with the numeric.  LabVIEW doesn't recognize the change event because technically the numeric is still active even though you don't see the cursor anymore.  The boolean is the most likely place where you would have this Return Key Navigation setup (usually an OK button).

 

You could also see this behavior if you have any key down filter events running where you are discarding an Enter/Return key.

 

 

0 Kudos
Message 11 of 30
(2,223 Views)

richjoh, thanks for your reply.  The event trigger is definately selected as 'Value Change'.  If I move the slider up and down, the event triggers.  If I put the cursor next to a digit in the numeric field and click the Up/Down key on the key board, the event triggers.  Clicking mouse button, while cursor is inside the numeric field, nothing happens.

0 Kudos
Message 12 of 30
(2,220 Views)

Does it work for the Return key?  The Return (with the letters) and Enter (part of the number keypad) keys register as different keys.

 

Something has to overriding the Enter key, whether it is another control with key navigation or you are filtering it with an event structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 30
(2,202 Views)

Crossrulz, thank you for your reply.  On my keyboard, both the key above 'Shift' and the key at the lower right corner of the number key pad are labeled 'Enter'.  And they both don't work.

0 Kudos
Message 14 of 30
(2,183 Views)

Crossrulz, forgot to memtion that I did not map any Key Navigation and did not use filter (not sure what filter is, so dd not actively turn filter on, but maybe unintentionally.  Can you educate me on filter?)

0 Kudos
Message 15 of 30
(2,180 Views)

Check out the attached VI (saved in 2011).  I have an event structure.  There is a case for "Key Down".  If you press each of the Enter keys, you will see that one of them is actually Return and the other is Enter.  There is also a filter event (Key Down?).  This allows you to catch the event and decide whether or not you actually want the event to be thrown.  So in the case I gave, if you press ESC, the filter event will discard the key down event and exit the loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 16 of 30
(2,161 Views)

Crossrulz, can you save your vi in 2010?  I only have LabVIEW 2010.  Thanks.

0 Kudos
Message 17 of 30
(2,142 Views)

@richard.koo wrote:

Crossrulz, can you save your vi in 2010?  I only have LabVIEW 2010.  Thanks.


Saved it in 2009 just in case.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 18 of 30
(2,138 Views)

Crossrulz, thank you for your vi.  It clearly demonstrates the use of KeyDown and KeyDown? which is new to me.  Unfortunately it is not the problem I am having.  I still don't know why my numeric control does not respond to Return or Enter keys any more.

0 Kudos
Message 19 of 30
(2,135 Views)

Can you try disabling or change both plot to a numerals then confirm whether or the Value Change event fires on Enter key? In other words reduce processing on the UI thread.

0 Kudos
Message 20 of 30
(2,127 Views)