Showing results for 
Search instead for 
Did you mean: 

Sending Virtual Keystroke of decimal separator using User32.dll

Go to solution

I need to use LV to send keystroke to an external executable program that controls an old lab instrument. Basically, I need LV to send a number (let’s say 123.45), a tab, another number and enter.

I tried to use this example based on User32.dll but here both the comma and the period character are not enabled.

I tried also this example ( but I was only able to input letters, numbers, tab, and carriage return. When I input the ASCII code for decimal separator (I have tried both 44 and 46) I get no results.

Is this a limitation of windows? I am running LV2019 on Win10 and 10 I have tried both Italian and English language option.

If so, what alternative method is the best option for my need?

Thanks for your help.


0 Kudos
Message 1 of 8
Accepted by topic author wireconnector

Did you try 190 (period)?


This may not be the same as for User32.dll but it does appear to have similar functionality. Might be worth a shot 😕

Heads up! NI is moving LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 2 of 8

This is perplexing.  Do you have any documentation on the messages?

(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 8

I did not look into the examples, but I think, they use the keybd_event() function from user32.dll

You have to use the virtual key code (not the ascii code) and thats 0xBC or 0xBE

See this webpage for a complete list of the virtual key codes:



Message 4 of 8

This might help you for period.


0x6E is the hex value for this

And you can use 188 or 0xBC for comma

CLD Using LabVIEW since 2013
Message 5 of 8


the link you provided is the correct reference.

For my purpose also 110 (decimal) and 188 (comma) are working.

Thank you very much.

0 Kudos
Message 6 of 8

The link you reported with HEX values it is useful and correct,

the linked example that I am using it is with decimal input so I just have to convert from HEX to DEC.


0 Kudos
Message 7 of 8

Yes, it is working just as in the screenshot you provided.


0 Kudos
Message 8 of 8