moses-palmer / pynput

Sends virtual input commands
GNU Lesser General Public License v3.0
1.78k stars 247 forks source link

name 'keyboard' is not defined #599

Closed andreguiw closed 5 months ago

andreguiw commented 5 months ago

I got this nameError exactly where all events are being called using the non blocking fashion in my last function of the code which I defined as start() as you guys can see in the print below. Is anyone having this issue??

nameerror

moses-palmer commented 5 months ago

Thank you for your report.

Since you only have included a screenshot and not the full source, I can only make a guess as to what the issue might be, but the Python interpreter raising a NameError indicates that you have not imported the keyboard module. Are you sure that you have an from pynput import keyboard statement at the top of the file?

I will close this issue, as I doubt that this is a bug with pynput. If you disagree, please reopen.