From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect keypress when other window is on top

I want to detect an event of KeyPress. To do so I tried using the event EVENT_KEYPRESS on the PanelCallback function.

Problem is when my UI is not the selected window, the event is not fired. What would be a solution for that?

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

HI Arra, 

 

This problem is not unique to CVI. You will notice that if any window is not the highlighted window, then it will not register a key press. You cannot type a word in word or a browser window without having that window highlighted. There is not an explicit solution to this in CVI, other than guaranteeing that the window that you want to register events is the one that is selected. 

0 Kudos
Message 2 of 2
(2,500 Views)