I am trying to write programm which will react for keyboard hotkeys.
import keyboard
keyboard.add_hotkey('ctrl+e', lambda: keyboard.write('Hello'))
keyboard.wait()
First time it worked fine but after second time it stopped working and my console showed me this error :
**Traceback (most recent call last):
File "E:\python_projects\keyboard.py", line 2, in <module>
import keyboard
File "E:\python_projects\keyboard.py", line 4, in <module>
keyboard.add_hotkey('ctrl+e', lambda: keyboard.write('Hello'))
AttributeError: module 'keyboard' has no attribute 'add_hotkey'**
My python is last-versioned. I tried to turn-off my antivirus system and re-install package. But it didn't help. I still have the same error. If you had this error and fixed this, write me what I need to do. Thanks in advance