I tried using 2 Packages and both of them are using same keyword
import keyboard
import pynput
import time
from pynput.keyboard import Key, Controller
from pynput import keyboard
keyboard = Controller() #From pynput Package
speed = float(input('speed: '))
def start():
while 1 == 1:
keyboard.press('f') #From pynput Package
time.sleep(speed)
keyboard.release('f') #From pynput Package
keyboard.wait('esc') #From keyboard Package
start()
The Program Should auto type 'f' and it was working fine but i tried to add "keyboard" package so i can stop the loop but it gave me error
I want hotkey key to stop the loop
error messege :
{
"resource": "/C:/Users/ali32/Desktop/Random Files/Python/test.py",
"owner": "python",
"code": "no-member",
"severity": 8,
"message": "Module 'pynput.keyboard' has no 'wait' member",
"source": "pylint",
"startLineNumber": 22,
"startColumn": 5,
"endLineNumber": 22,
"endColumn": 5
}