Keyboard type (qwerty/azerty) detection

Hi,

How can I detect, on a script, the type of keyboard: qwerty or azerty?

My need is to use the keys to move a character and remap automatically these keys according to the type of keyboard.

Thank you for your help
Thomas

You can use Application.systemLanguage to get the system locale. If you really want to get the keyboard layout you can import user32.dll from Windows, which will eventually be platform dependent code.

You can do it with this code: c# - Properly detect keyboard layout - Stack Overflow

System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName

Should work even if you have an OS in a different language.

Thanks for this solution.
It help me a lot.

Thomas