自動觸發全域性按鍵

2021-08-20 20:50:00 字數 380 閱讀 3571

前言:使用錄屏軟體,發現不能記錄結束時間,還要自己設定鬧鐘去結束錄製,太麻煩。

軟體使用的全域性開始錄製,結束錄製的按鍵都為f3(對應的按鍵值為114)

例:

import win32con  

import win32api

import time

time.sleep(5)

win32api.keybd_event(114,0,0,0)

minutes = 0

seconds = 6

time.sleep(minutes*60 + seconds + 4) #單位為秒

win32api.keybd_event(114,0,0,0)

參考:

Qml全域性按鍵

建立乙個c 類 對事件進行監聽 bool qmlkey eventfilter qobject watched,qevent event if event type qevent keyrelease return qobject eventfilter watched,event 註冊並連線訊號槽...

滑鼠與按鍵 事件觸發順序

事件觸發順序 之前研究過input文字框的事件觸發順序,今天突然想起來,就做個總結。type text name id txt var txt document.queryselector txt txt.onmousedown function txt.onmouseup function txt...

滑鼠與按鍵 事件觸發順序

var txt document.queryselector txt txt.onmousedown function txt.onmouseup function txt.onfocus function txt.onclick function txt.onkeydown function tx...