Detect current keyboard language/layout name in multi-language computer

前端 未结 6 1423
感动是毒
感动是毒 2020-12-09 00:06

I am trying to develop an application in C# which required to detect user selected language (keyboard layout). However two languages are installed on my computer, the code a

6条回答
  •  無奈伤痛
    2020-12-09 00:32

    This one returns the input language currently active (the one that is your keyboard types currently):

    InputLanguage myCurrentLang = InputLanguage.CurrentInputLanguage;
    

提交回复
热议问题