使用pyautogui库,模拟按键win+d
import pyautogui pyautogui.keyDown('win') pyautogui.press('d') pyautogui.keyUp('win')