问题描述
我如何重新映射,例如AltGr + i
?
我知道如何重新映射其他组合,例如 alt + i
(!i::Send,test
) 或 shift + i
(+i::Send,test
)。但这不适用于 AltGr
。
我知道如何映射 AltGr
孤立:LControl & RAlt::Send,test
有效。但是 LControl & RAlt & i::Send,test
不起作用。
那么,我该怎么做?
解决方法
来自 OP 链接的帖子:
使用上下文敏感的 #IF
语句检查 AltGr 是否被按下,然后创建标准的一键热键。
@user3419297 的例子:
LControl & RAlt:: AltGr := true ; assign the boolean value "true" to the variable 'AltGr''
LControl & RAlt Up:: AltGr := false
; The #If directive creates context-sensitive hotkeys and hotstrings
#If (AltGr) ; If this variable has the value "true"
a:: MsgBox AltGr+a
a & b:: MsgBox AltGr+a+b
b & a:: MsgBox AltGr+b+a
h & l:: Send Hello
i & e:: Run iexplore.exe
n & p:: Run notepad
w & p:: Run wordpad
#If ; turn off context sensitivity
所以对于 OP 的具体问题:
#If (AltGr)
i::Send,test
#If