- 14 Kas 2023
- 15
- 4
import time
import threading
from pynput.mouse import Controller, Button
from pynput.keyboard import Listener, KeyCode
TOGGLE_KEY = KeyCode(char="-")
clicking = False
mouse = Controller ()
def clicker():
while True:
if clicking:
mouse.click(Button.left, 1)
time.sleep(0.0000000000000001)
def toggle_event(key):
if key == TOGGLE_KEY:
global clicking
clicking = not clicking
click_thread = threading.Thread(target=clicker)
click_thread.start()
with Listener(on_press=toggle_event) as listener:
listener.join()
Key Code char kısmına istediğiniz tuşu atayabilrisiniz
Son düzenleme: