stay Python In, we will simulate the keyboard for some input
1.Win+R, Input cmd
Open the command line
2. Input pip install pypiwin32
The download website you actually visit is https://pypi.Python.org/simple/, This is a foreign website , Relatively slow
At this time, we can use domestic websites
Douban source
pip install pypiwin32 -i https://pypi.douban.com/simple
Tsinghua University source
pip install pypiwin32 -i https://pypi.tuna.tsinghua.edu.cn/simple
import win32api
import win32con
win32api.keybd_event(17, 0, 0, 0) #Ctrl
win32api.keybd_event(86, 0, 0, 0) #V
win32api.keybd_event(86, 0, win32con.KEYEVENTF_KEYUP, 0) # Release command
win32api.keybd_event(17, 0, win32con.KEYEVENTF_KEYUP, 0)