仅在单独按下键时发送
Send only if key was pressed alone
我想将我的 windows 键重新映射到其他东西,但我也想保留所有基于 windows 键的快捷方式。
在伪代码中它会是这样的:
when LWin Down
until LWin Up
if not LWin down
abort
else
execute command
在按下左 windows 键后的 0.3 秒内释放它,以执行其他操作(例如发送 a):
~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
我想将我的 windows 键重新映射到其他东西,但我也想保留所有基于 windows 键的快捷方式。
在伪代码中它会是这样的:
when LWin Down
until LWin Up
if not LWin down
abort
else
execute command
在按下左 windows 键后的 0.3 秒内释放它,以执行其他操作(例如发送 a):
~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