Autohotkey:Firefox 上的热键没有按预期执行
Autohotkey: Hotkeys on Firefox not doing what they're supposed to
我只想W对应向上箭头键和S对应到 向下箭头 键,并像他们一样工作,然后 A/D 将焦点移动到 last/next 选项卡。
当我按住 S 时,页面不规律地向下跳动,然后 Firefox 多次打开 "Save as" window。
当我按住W时,页面不规律地向上跳,然后关闭了多个标签。
D 做了它应该做的,而 A 直接不起作用。
#IfWinActive ahk_exe firefox.exe
w::
Send {Up} ; Move page up.
s::
send {down} ; Move page down.
a::
send, ^{pgup} ; Go to tab on the left.
d::
send, ^{pgdn} ; Go to tab on the right.
#IfWinActive
Return
到底发生了什么?它应该可以正常工作,但事实并非如此。
#IfWinActive ahk_exe firefox.exe
w:: Send {Up} ; Move page up.
s:: send {down} ; Move page down.
#IfWinActive ; turn off context sensitivity
以上示例被称为单行热键,因为每个只包含一个命令。
要一个热键执行多个命令,请将第一行放在热键定义下方,并将最后一行设为 return 。例如:
#n::
Run http://www.google.com
Run Notepad.exe
return
我只想W对应向上箭头键和S对应到 向下箭头 键,并像他们一样工作,然后 A/D 将焦点移动到 last/next 选项卡。
当我按住 S 时,页面不规律地向下跳动,然后 Firefox 多次打开 "Save as" window。
当我按住W时,页面不规律地向上跳,然后关闭了多个标签。
D 做了它应该做的,而 A 直接不起作用。
#IfWinActive ahk_exe firefox.exe
w::
Send {Up} ; Move page up.
s::
send {down} ; Move page down.
a::
send, ^{pgup} ; Go to tab on the left.
d::
send, ^{pgdn} ; Go to tab on the right.
#IfWinActive
Return
到底发生了什么?它应该可以正常工作,但事实并非如此。
#IfWinActive ahk_exe firefox.exe
w:: Send {Up} ; Move page up.
s:: send {down} ; Move page down.
#IfWinActive ; turn off context sensitivity
以上示例被称为单行热键,因为每个只包含一个命令。
要一个热键执行多个命令,请将第一行放在热键定义下方,并将最后一行设为 return 。例如:
#n::
Run http://www.google.com
Run Notepad.exe
return