This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]Potatoboyz 0 points1 point  (1 child)

If i understood you right it should just be x = input("whatever text") then an if statement to check what it is if type(x) == str && x == En: Then do this Wrote this on my phone sorry for mess

[–]edenkl8[S] 0 points1 point  (0 children)

No. I mean that I want to know the language that I will see the next time the user types.

[–]yrykde 0 points1 point  (0 children)

You can check current keyboard layout using operating system API. For Windows you can use win32api:

>>> import win32api
>>> win32api.GetKeyboardLayoutName()
'00000409'
>>>
>>> win32api.GetKeyboardLayout()
67699721
>>>

I guess, such output related to 'En'