win32api.VkKeyScanEx

int = VkKeyScanEx(char, hkl )

Translates a character to the corresponding virtual-key code and shift state.

Parameters

char : string or unicode

A byte or unicode string of length 1. If a byte string is passed VkKeyScanExA will be called, otherwise VkKeyScanExW will be called.

hkl : PyHANDLE

Handle to a keyboard layout at returned by win32api::LoadKeyboardLayout

Win32 API References

Search for VkKeyScanExA at msdn, google or google groups.

Search for VkKeyScanExW at msdn, google or google groups.