LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

track key down event when 3d scene window is on the top

 Hello, 

 

Im working on a program to show 3d objects in a scene window, and then control the position with keyboard events. But when the scene window is on the top instead of the front panel, the vi doesn't response anymore to key down event.

 

In the attachment is an example. I need to make sure the front panel is on the top so that the left or right key controls the rotation of the cubic around the sphere. If the scene window is on the top, it won't work. Anybody help me? Thanks.

0 Kudos
Message 1 of 2
(2,307 Views)

This is expected behavior. The key down event is bound to <This VI>. If the VI doesn't have the focus, the internal LV event handling mechanism doesn't pass this event to the VI to handle.

As a workaround, you can set the "FP IsForemost" property to TRUE in order to get the focus on the VI before the event structure. Use the error cluster to make sure that this property node executes before the event structure (data flow).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 2
(2,273 Views)