customize chrome developer tool javascript debugger keyboard shortcuts?

后端 未结 10 1016
野趣味
野趣味 2020-12-05 06:02

I can\'t believe that neither a Google or SO search has turned up a definitive answer or even much discussion for this, but:

Is it possible to edit/customize keyboar

10条回答
  •  时光说笑
    2020-12-05 06:38

    My solution is using Autohotkey, a tool that I use for shortcuts in any app.

    I make and run an .ahk script like this:

    #IfWinActive ahk_class Chrome_WidgetWin_1 ; Chrome browser
    F2::Send, ^b ; toggle breakpoint (Ctrl+b)
    ^b::Send, ^m ; use Ctrl+b for something else
    

    It's simple: only when Chrome browser window is active, override F2 key and simulate Ctrl+b, which is official Chrome shortcut to toggle breakpoint.

    I actually run my ahk script when Windows starts, so shortcuts are always active.

    You can add more shortcuts. You can use different browser or app. One thing that I can't improve yet is listening for shortcuts only when web developer tools in browser are active, maybe there's a way.

提交回复
热议问题