我知道问题,但不知道如何解决它。控制器被覆盖,但我该如何改变呢?
import pynput
from pynput.keyboard import Key, Controller
from pynput.mouse import Button, Controller
keyboard = Controller()
mouse = Controller()
keyboard.press(Key.cmd_l), keyboard.press('d')
keyboard.release(Key.cmd_l), keyboard.release('d')
mouse.move = (58, 535)
mouse.click(Button.left, 1)
with keyboard.pressed(Key.cmd_l):
keyboard.press(Key.cmd_l)
keyboard.release(Key.cmd_l)
keyboard.press('d')
keyboard.release('d')