Q
Q
queryz2021-11-15 13:57:09
Python
queryz, 2021-11-15 13:57:09

Python how to change keyboard layout?

Hello everyone, I need to change the keyboard layout in python, from English to Russian and vice versa. When I googled, I came across the pywin32 library. And here is the code I ended up writing:

import win32api

win32api.LoadKeyboardLayout("00000419",1) # на русскую 
win32api.LoadKeyboardLayout("00000409",1) # на английскую


But unfortunately the layout does not change, but there is no error.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question