Tsolakos Stavros wrote:
Hi all.

I was trying to find a way to read the currently selected input layout
from an app written in python. I am aware that if the app were written
in C, I would have to call the GetKeyboardLayoutName() function. How can
this be done in Python? I want to avoid writing an extension just for
this. The function is not available through pywin32.

<code>
import ctypes

s = ctypes.create_unicode_buffer (1024)
ctypes.windll.user32.GetKeyboardLayoutNameW (s)

print s.value

</code>

TJG
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to