简体   繁体   English

Autohotkey:Firefox上的热键没有执行应有的功能

[英]Autohotkey: Hotkeys on Firefox not doing what they're supposed to

I just want W to correspond to the Up Arrow key and S to correspond to the Down Arrow key, and work just like they do, and for A/D to move the focus to the last/next tab. 我只希望W对应于上箭头键,而S对应于下箭头键,并且像它们一样工作,并让A / D将焦点移至上一个/下一个选项卡。

When i hold S , the page skips down erratically and then Firefox opens the "Save as" window multiple times. 当我按住S时 ,页面会不正常地跳下,然后Firefox多次打开“另存为”窗口。

When i hold W , the page skips up erratically and then multiple tabs are closed. 当我按住W时 ,页面会不规律地跳过,然后关闭多个选项卡。

D does what it's supposed to, and A straight up doesn't work. 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

What exactly is happening? 到底是什么情况? It should work normally but it isn't. 它应该正常工作,但不是。

#IfWinActive ahk_exe firefox.exe

    w:: Send {Up}       ; Move page up.
    s:: send {down}     ; Move page down.

#IfWinActive    ; turn off context sensitivity

The above examples are known as single-line hotkeys because each consists of only one command. 上面的示例被称为单行热键,因为每个示例仅包含一个命令。

To have more than one command executed by a hotkey , put the first line beneath the hotkey definition and make the last line a return . 要使一个热键执行多个命令 ,请将第一行放在热键定义下方,并使最后一行返回 For example: 例如:

#n::
Run http://www.google.com
Run Notepad.exe
return

https://autohotkey.com/docs/Hotkeys.htm#Intro https://autohotkey.com/docs/Hotkeys.htm#Intro

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM