Python simulate keydown

This code should get you started. ctypes is used heavily. At the bottom, you will see example code. import ctypes LONG = ctypes.c_long DWORD = ctypes.c_ulong ULONG_PTR = ctypes.POINTER(DWORD) WORD = ctypes.c_ushort class MOUSEINPUT(ctypes.Structure): _fields_ = ((‘dx’, LONG), (‘dy’, LONG), (‘mouseData’, DWORD), (‘dwFlags’, DWORD), (‘time’, DWORD), (‘dwExtraInfo’, ULONG_PTR)) class KEYBDINPUT(ctypes.Structure): _fields_ = ((‘wVk’, WORD), (‘wScan’, … Read more