如何讓 google chrome 使用滑鼠滾輪切換標籤?

如何讓 google chrome 使用滑鼠滾輪切換標籤?

我在家運行的是 Fedora 17,並且已經習慣了將滑鼠懸停在選項卡欄上時使用滑鼠滾輪快速掃描打開的選項卡。現在這對我來說是一個非常自然的舉動。

在工作中,我至少每週一次(通常是星期一)嘗試在 MacBook Pro 上運行的 Chrome 上使用相同的技術,但選項卡不會移動。這開始讓我發瘋。

有誰有一個解決方案可以讓我使用滾輪更改 OSX 版 google chrome 上的選項卡?

(我發現了以下谷歌程式碼線程,但據我所知,建議的修復並沒有解決問題——http://code.google.com/p/chrome-convenience-extension/issues/detail?id=31

答案1

在 Google 網上論壇貼文中找到了解決方案。透過以下腳本使用 AutoHotKey:

;; Wheel Scroll Tabs for Google Chrome 

#IfWinActive ahk_class Chrome_WidgetWin_1 
 ~$WheelDown:: 
 ~$WheelUp:: 
    MouseGetPos,, yaxis 
    IfGreater,yaxis,23, Return 
    IfEqual,A_ThisHotkey,~$WheelDown, Send ^{PgDn} 
                                 Else Send ^{PgUp} 
Return 
#IfWinActive

注意:我已將其更改為,Chrome_WidgetWin_1因為這對我有用。如果這對您不起作用,請嘗試將其更改為Chrome_WidgetWin_0

來源

答案2

擴充名Chrome 工具箱您可能感興趣:

Chrome 工具箱選項

我還沒有在 OSX 上測試過它,但它適用於 Windows 7,並且不應該有相容性問題。

答案3

如果您使用的是 Chrome 32+,請使用 AutoHotKey(編譯腳本)檢查此解決方案。 Chrome 工具箱不適用於 31 以上的 Chrome。

https://plus.google.com/115670442023408995787/posts/WYPqqk2j9UB

或直接使用:

; Mouse Wheel Tab Scroll 4 Chrome
; -------------------------------
; Scroll though Chrome tabs with your mouse wheel when hovering over the tab bar.
; If the Chrome window is inactive when starting to scroll, it will be activated.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn   ; Enable warnings to assist with detecting common errors.
#SingleInstance force   ; Determines whether a script is allowed to run again when it is already running.
#UseHook Off    ; Using the keyboard hook is usually preferred for hotkeys - but here we only need the mouse hook.
#InstallMouseHook
#MaxHotkeysPerInterval 1000 ; Avoids warning messages for high speed wheel users.

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
Menu, Tray, Tip, Mousewheel tab scroll for Chrome (1.0.3)

WheelUp::
WheelDown::
    MouseGetPos,, ypos, id
    WinGetClass, class, ahk_id %id%
    If (ypos < 45 and InStr(class,"Chrome_WidgetWin"))
    {
        IfWinNotActive ahk_id %id%
            WinActivate ahk_id %id%
        If A_ThisHotkey = WheelUp
            Send ^{PgUp}
        Else
            Send ^{PgDn}
    }
    Else
    {
        If A_ThisHotkey = WheelUp
            Send {WheelUp}
        Else
            Send {WheelDown}
    }
    Return

答案4

有一個適用於 Windows 用戶的 Chrome 擴充程序,名為自動控制將此功能新增至瀏覽器。
說明在這裡:
https://www.autocontrol.app/hover-sensitive-shortcuts#scrollwheel-on-tabs

當滑鼠位於選項卡條上方或位於整個標題區域或位於瀏覽器視窗上的任何位置或任何您想要的位置時,您可以使滾輪切換標籤。
您也可以將滾輪與CTRLSHIFTALT或其他滑鼠按鈕或幾乎任何您能想到的組合結合在一起。它比我見過的任何其他應用程式都具有更多的可配置性。

相關內容