Example Code

Read Keyboard Language/Layout with LabVIEW using User32.DLL

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW
  • Other

Code and Documents

Attachment

Download All

Introduction

This vi is used to read the current Keyboard being used on a Windows Operating System.

 

Description

This vi is used to read the current Keyboard being used on a Windows Operating System. It used information from MSDN - GetKeyboardLayout Function to reach functionality. The hex information returned can be used in conjuction with the MSN Language Indentifier to identify the current keyboard layout used.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Download the vi and run. Compare Hex returned information with MSN Language Identifier to check which is being used.

 Additional Information or References
VI Snippet

317.png 

 

Uses LabVIEW call library function with user32.dll 

Untitled.png

**This document has been updated to meet the current required format for the NI Code Exchange.** 

Ashish Naik
Automotive Business Development Manager
National Instruments UK

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.