最开始在脚本中定义了lctrl,lalt双击切换输入法:
/*
LAlt:: ; why unable to use in input box by srun
if (A_PriorHotkey <> "LAlt" or A_TimeSincePriorHotkey > 400)
{
; Too much time between presses, so this isn't a double-press.
KeyWait, LAlt
return
}
;SendInput {Enter}
;gosub NextIME
gosub en
return
LCtrl:: ; why unable to use in input box by srun
if (A_PriorHotkey <> "LCtrl" or A_TimeSincePriorHotkey > 400)
{
; Too much time between presses, so this isn't a double-press.
KeyWait, LCtrl
return
}
;gosub NextIME
gosub cn
return
*/
使用时发现其他使用ctrl或者alt的组合键无法使用了?!
于是想办法修改上述代码:
~LCtrl::
if (A_PriorHotkey = "~LCtrl" and A_TimeSincePriorHotkey < 400)
{
gosub cn
}
return
~LAlt::
if (A_PriorHotkey = "~LAlt" and A_TimeSincePriorHotkey < 400)
{
gosub en
}
return
这样,果然OK了!
网友评论