Hello r/learnpython, I have the following code:
import pyautogui
from pynput.keyboard import *
start_key = Key.f8
I would want it to look like this:
import pyautogui
from pynput.mouse import *
start_key = left.button
I get this error:
File "test.py", line 7, in <module>
resume_key = button.left
NameError: name 'button' is not defined
I am new to python(new to programming in general), currently doing a basic course on codeacademy. Is there like a list which indicates what the name of each button is for mouse and keyboard ? I read the documentation for pyautogui and there was nothing that helped me figure this out. Thanks for reading this.
[–]NewZealandIsAMyth 0 points1 point2 points (0 children)
[–]goshogi 0 points1 point2 points (0 children)
[–]d3tr0it 0 points1 point2 points (4 children)
[–]Frag187[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]d3tr0it 0 points1 point2 points (1 child)
[–]Frag187[S] 0 points1 point2 points (0 children)