04-19-2010 10:14 AM
Hi all! So, in writing my app I noticed that the F3 key does not trigger the "Key Down?" filter event I have in my Event Structure, but the other function keys (F1, F2, F4-F12) all do. I can tell because I have an indicator set to show what VKey was pressed and it never shows F3. It brings up a search window when I'm on the Windows desktop, so the key does work.
Anyone have any idea why LabVIEW finds F3 so special? I do plan on using some of the function keys in my app, but not having F3 is no big deal; I'm just curious why it doesn't work.
This is on LabVIEW 2009 (with f3 patch) 32-bit on Windows Vista 64-bit.
Thanks!
04-19-2010 10:21 AM
I have no issues with the following code on Windows 7, 32 bit. LabVIEW 2009.1
Ton
04-19-2010 10:24 AM
04-19-2010 11:19 AM - edited 04-19-2010 11:23 AM
D'oh! I forgot to mention that my event is linked to a string control in my program. The VI snippet posted by TCPlomp works fine and F3 appears to trigger the event. However, once I modify that snippet to add a string control and link the event to the control then F3 no longer works.
I don't know why the wires are broken in the snippet any why the Event isn't assigned. So here's the VI also.
04-19-2010 11:26 AM
04-19-2010 11:46 AM - edited 04-19-2010 11:47 AM
The event case is properly linked up in the attached VI; however, I don't know why the snippet itself (which is from the attached VI) is broken. The attached VI is a modification of the snippet that was posted earlier by TCPlomp. His snippet worked as is, but it showed the same problem when I modified it.
I should probably try to explain what I want to do. The app I'm working on is a serial console. I use the "Key Down?" filter event on the main text area (console window) of my app because I need to be able to trigger different actions based on the key pressed. For example, pressing a normal key allows me to just send that character over the serial port, pressing Enter sends the proper line ending sequence (CR, LF, or CRLF), and I want to be able to use the function keys to set up string macros. Basically, you can map a serial command to a function key and pressing it will send that command plus the proper line ending over the serial port.
The reason why I use a filter event is because I can discard the event if local echo is turned off.
I can certainly deal with not having F3, but I'm just curious what makes that key so special.
04-19-2010 11:56 AM
Maybe F3 is setup as a special key for your OS on your PC setup by your manufacturer???
- I can't download the snippets 'cos I'm working in 8.6 at them moment, so I'm working on what I could see and think of.
James
04-19-2010 12:04 PM
That's actually what I was thinking, too. That F3 must be some special key. In Windows Vista, F3 opens up a search window, so it is a special key in a sense. Then I found that TCPlomp's snippet does work with F3, which is why I'm curious.
Thanks for the responses!
04-19-2010 12:27 PM
04-19-2010 12:48 PM
The VI should be in the bottom of the message with the snippet, but here it is again in case it didn't attach correctly.