import pynput
from pynput.keyboard import Key, Listener
def keyenter(key):
print("{0} pressed".format(key))
def keyexit(key):
if key == Key.esc:
return False
with Listener(keyenter=keyenter, keyexit=keyexit) as listener:
listener.join()
I keep getting the error -- ModuleNotFoundError: No module named 'pynput'
I've been at this for a while. Even had a go at online IDE's such as online-python.com, but threw the same error.
There are similar threads on stackoverflow but none seem to have a solid fix/guide to solve this.