分页: 1 / 1

关于pyhook请教一个比较初级的问题

发表于 : 2009-01-13 10:01
zhangqunjun
看例子的時候發現如果組合鍵為alt+A的方式可以做如下判斷:
if event.Alt and event.Key == 'A'
return False #block

我想请问一下 pyhook如何block如下組合按鍵:ctrl+alt+F1或者是ctrl+shift+F1

:em06

Re: 关于pyhook请教一个比较初级的问题

发表于 : 2015-07-06 8:56
SunGreal2006
One possible solution to your question is to set key-pressed-down state keyword as below:

#Parameter statement:

Key_Control=False
Key_F1=False

def OnMouseEvent(event):
if(event.KeyID== or ): #Left or Right Control
Key_Control=True
elif(event.KeyID== )
Key_F1=True
......................