How to check current Keyboard Input Layout

Good day!
I need to check the current Keyboard Layout and act depending on language. Maybe there is some method?
For example I need to check the current language and if it is “ENG” than do some action, if not - change layout. And this should work on Win10 and Win7

1 Like

hey @ilvor

Yes you can by using InputLanguage.CurrentInputLanguage.LayoutName . // For me it returns English (India).

Above will return you the default keyboard Layout name.

if you want to know the current Language name if more then one language installed on your system then you can go with this piece of code


// For me it returns “en-US”.

Note- please import first System.Windows.Forms namespace in your project.