[英]Remapping issue Autohotkey
Please, bear with me, I'm a autohotkey noob. 拜托,请忍受我,我是一个自动热键菜鸟。 I want left: control and shift to switch from their current key value to arrow: down and up respectively when pressing the F2 key.
我要左键:控制和shift键,从当前键值切换到箭头:按下F2键时分别向下和向上键。 And when the F2 key is pressed again, I want left: control and shift to return to their original key value.
当再次按下F2键时,我想离开:控制并移动到其原始键值。 This is my code so far:
到目前为止,这是我的代码:
F2::
{
if LShift = Up
{
LShift::Send {LShift}
}
else
{
LShift::Send {Up}
}
if LControl = Down
{
LControl::Send {LControl}
}
else
{
LControl::Send {Down}
}
}
Regrettably I haven't been able to make it work. 遗憾的是,我无法使其工作。 Any help will be truly appreciated.
任何帮助将不胜感激。
Return
. Return
结束。 You can pretty much short your code down to: 您可以将代码缩短到:
F2::(F2Toggle:=!F2Toggle)
#If F2Toggle
LShift::Up
LControl::Down
#If
Pressing F2 will toggle the variable F2Toggle
between true and false. 按下F2将在真与假之间切换变量
F2Toggle
。 #If F2Toggle
means if the variable F2Toggle
is currently set to True then enable the hotkeys below. #If F2Toggle
表示变量F2Toggle
当前是否设置为True,则启用下面的热键。 #If
marks the end of the special #If
statement. #If
标记特殊的#If
语句的结尾。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.