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.
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.
05-11-2021 03:47 PM
Hi,
I have a very simple vi which i`m trying to detect when the left control button on the keyboard has been pressed. What i find is when the laptop is locked using the windows button + L the L and WIN remain in the buffer until they have been pressed in turn.
Is there anyway to clear this buffer after a key has been read?
Thanks
James
05-12-2021 02:00 AM - edited 05-12-2021 02:02 AM
05-12-2021 11:25 AM
@GerdW wrote:
which subVI are you using in that image? I don't recognize that icon…
Mind to attach your VI(s)?
My guess the subVI is this instance of the polymorphic "acquire input data".
05-13-2021 01:56 AM
Hi,
I`m using the acquire input device.vi. This is used in a larger vi to copy text from a front panel but it is an old program which was wrote using loops and is too much trouble to update.
Thanks
05-13-2021 08:10 AM
Hi Kangaroo,
@JumpingKangaroo wrote:
This is used in a larger vi to copy text from a front panel but it is an old program which was wrote using loops and is too much trouble to update.
You need to acquire keyboard data to "copy text from a front panel"? I guess there are better ways to do that…
@JumpingKangaroo wrote:
What i find is when the laptop is locked using the windows button + L the L and WIN remain in the buffer until they have been pressed in turn.
I see that too.
I'm guessing this is because your task just sees, when the keys are pressed, but doesn't recognize the release of those keys when Windows intercepts for locking the screen…
You might filter the returned array for "LWIN" and "L" items. Or you improve the way how you "copy text from a frontpanel"…
@Christian wrote:
My guess the subVI is this instance of the polymorphic "acquire input data".
You're right (as usual)! 😄
I just looked into the Connectivity/InputDevices palette, but there only the polymorphic container icon is shown…