2017-05-31 51 views
1

我想重新映射我的Windows密钥到其他东西,但我也想保留所有基于Windows密钥的快捷方式。只有当按键被按下时才发送

在伪代码,这将是这样的:

when LWin Down until LWin Up if not LWin down abort else execute command

回答

2

松开左窗口键0,3秒内按下它以后,做别的东西(例如发送):

~LWin:: 
KeyWait, LWin 
return 

~LWin Up:: 
Send {LWin Up} 
If (A_PriorHotKey = "~LWin" AND A_TimeSincePriorHotkey < 300) 
    Send, a 
; else ; another action after long press (not recommendet) 
    ; Send, b 
return 

编辑:

也尝试这样的:

LWin up:: 
If (A_PriorKey = "LWin") 
    Send a 
return 

; In this case its necessary to define a custom combination by using "&" or "<#" 
; to avoid that LWin loses its original function as a modifier key: 

<#d:: Send #d ; <# means LWin 
+0

试试我的编辑答案。 – user3419297

+0

第二个版本中的“d”是什么? '<#d ::'什么是'd'? –

+0

“<#d”是原始组合键“LWin + d”,可以最小化所有窗口。 – user3419297

相关问题