只有当按键被按下时才发送
问题描述:
我想重新映射我的Windows密钥到其他东西,但我也想保留所有基于Windows密钥的快捷方式。只有当按键被按下时才发送
在伪代码,这将是这样的:
when LWin Down until LWin Up if not LWin down abort else execute command
答
松开左窗口键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
试试我的编辑答案。 – user3419297
第二个版本中的“d”是什么? '
“ user3419297