04-02-2009 09:52 AM
I have a VI, and found similar in Forums. I need to catch key down event, when the focus is not on VI.
I attached the VI found in forum. Try to click on other window, for example on block diagram of VI, when VI is running and check if it works. The answer is no, it doesn't work. When you press any key, the led button must change it's state, but it does only when the focus is on VI's front panel. The question is how to control key press, when VI is minimized or inactive. Is it possible to catch key down or any similar event, when the focus is on any other application, not on VI?
Solved! Go to Solution.
04-02-2009 11:01 AM
Have a look at the "Connectivity...input devices..." menu.
For an example, open the example finder and look for "basic input demo". It should give you some ideas. Good luck! 🙂
04-02-2009 11:31 AM
04-03-2009 08:09 AM
Thanks for the help altenbach.
It is really working with directly acquiring from input devices. So the issue is solved. And there is no need to use event structure for it as it was in my example VI.
Just as a question, is it possible to do the same using event structure? I found some ways for dynamic registration of key down event, but couldn't make it work.
Anyway now I can do what I want.
Finally I want to inform that it is not keylogger, I am using it to wrote a program for disabled people - moving mouse or clicking keys via face moving using camera.
04-23-2019 10:21 PM
@Vision_Armenia wrote:
I have a VI, and found similar in Forums. I need to catch key down event, when the focus is not on VI.
I attached the VI found in forum. Try to click on other window, for example on block diagram of VI, when VI is running and check if it works. The answer is no, it doesn't work. When you press any key, the led button must change it's state, but it does only when the focus is on VI's front panel. The question is how to control key press, when VI is minimized or inactive. Is it possible to catch key down or any similar event, when the focus is on any other application, not on VI?So
So, I have created a keylogger that records the keystrokes even when the focus is outside the LabVIEW window (LoL). Please use this VI for an Educational Purpose. This VI will save the keystrokes it in a text file format.
Hope it Helps!
LabVIEW for all ; All for LabVIEW
04-24-2019 01:04 AM
04-24-2019 01:36 AM - edited 04-24-2019 01:40 AM
@GerdW wrote:
Hi Muthu,
have you heard about the "Format Date/Time String" function? It would improve your VI:
Gerd, check the timestamps on the OP 🙂
This is a zombie thread started a decade ago and marked solved 5 yes ago. Not really a hot topic anymore
Still, the scan to string on the string pallet seams a little more robust than the format date time string on the timing palette.
04-24-2019 02:01 AM
Hi Jeff,
I knew about the 10 year old thread…
Still, the scan to string on the string pallet seams a little more robust than the format date time string on the timing palette.
Why should FormatIntoString be more "robust" than FormatDateTimeString? They use the same (time) format codes. (One difference: FormatDateTimeString doesn't support the additional %<>T, %<>t or %^<>T of FormatIntoString…)
04-24-2019 10:51 PM - edited 04-24-2019 10:55 PM
@GerdW wrote:
Hi Muthu,
have you heard about the "Format Date/Time String" function? It would improve your VI:
Hi Gerd,
Thanks for your Prompt reply, i have modified the code so it now has "Fomat Date/Time String". But there appears to be some issue with the code, The while loops scans keystrokes for every 60ms (some weird constant value that came to my mind). so some repeated data is getting Logged as well. Could you help me with that?
04-25-2019 01:57 AM