LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read F13-F17 function & Select keys from old IBM keyboard

I am testing a USB HID keypad device using LabVIEW. I need to check to make sure that the keypad and buttons function properly. The way the keypad and buttons are mapped, a few of the buttons are mapped to function keys F13-F17 and one Select key which I am told are from very old IBM keyboards. I would like to use the HID driver associated with Windows for ease of use. How can I use LabVIEW to check to see if the device buttons mapped to these F13-F17 function keys when pressed output the expected hex value?
0 Kudos
Message 1 of 4
(7,255 Views)
Thank for posting to the National Instruments Discussion Forums.

Regarding your question these is a utility available on the following web page that will be very useful for your project.

Keyboard Utilities

Inside the keyboard.zip file on that page is a library called Keyex.llb which contains an example called "Function Key Demo". After extracting the libraries in this .zip file to the same directory, and running this example you will be able to get a 1-12 displayed in LabVIEW that corresponds to proper Fn key being pressed on a keyboard.

Thank you, and have a great day!

Scott Yellig
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(7,235 Views)
I know of this keyboard utility already and have already played with it. It does work great but it doesn't support function keys above F12 (i.e. F13-F17). Is there any way to modify this VI or the keyboard driver itself in order to read in function keys above F12?
0 Kudos
Message 3 of 4
(7,226 Views)
I took a look inside this Fn key demo, and after digging down a couple levels I found a VI called "Check for Function Key.vi".

Inside that VI are two controls Labeled F1 and F12. These controls set the limits for what integer numbers should be interpreted as function keys. F1 is set to be 15 and F12 is set to be 26. Depending on how your keyboard works, it may be enough to increase the top limit to include five more numbers. Unfortunately I am not able to test this out, as my keyboard only goes up to F12.

If this does not work, I would suggest looking again at the Function Key Demo.vi. Specifically, I would like to ask you to create an indicator on the output of the Index Array. This will allow you too see all information available when a specific key is pressed. Running this VI with the indicator added and pressing your extended function keys should let you see the raw keyboard information and allow you to modify the "Check for Function Key.vi" appropriately.

Thank you again, and have a great day.

Scott Yellig
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(7,216 Views)