我使用Python几乎运行键盘,使用下面的代码工作做按Ctrl + Alt键 + 德尔不工作,但是,按Ctrl + Shift + Tab或其他键组合正在以这种方式工作。 的,我指的十六进制代码列表是从人hereCTRL + ALT + DEL不WIN32API和Python
import win32api
import win32con
import time
win32api.keybd_event(0xA2, 0,0,0)
time.sleep(.01)
win32api.keybd_event(0xA4, 0,0,0)
time.sleep(.01)
win32api.keybd_event(0x2E, 0,0,0)
time.sleep(.04)
win32api.keybd_event(0xA2,0 ,win32con.KEYEVENTF_KEYUP ,0)
time.sleep(.01)
win32api.keybd_event(0xA4,0 ,win32con.KEYEVENTF_KEYUP ,0)
time.sleep(.01)
win32api.keybd_event(0x2E,0 ,win32con.KEYEVENTF_KEYUP ,0)
帮助,将不胜感激。为此使用Windows 7。
是的,在这里提到:https://stackoverflow.com/questions/43841820/ctrlaltdel-not-working-in-win32api-and-python#answer-43842599 –