• 此篇文章为《firefox快捷键》的继续讨论,原文章地址为:http://confusedday.blogbus.com/logs/6679336.html

    原文摘要:

    由于使用vi习惯,经常在firefox里想用"j","k"键去向下翻页.

    Google一下,还真有人和我想法一样:

    http://johan.fredin.info/firefox_vi-bindings.html
    详细内容为:
    http://www.mozilla.org/unix/customizing.html
    步骤为:
    Firefox_Install_Dir}\res\builtin\下建立文件userHTMLBindings.xml 文件.
    文件内容为

    HUHU!这几天发现不用这么复杂了,直接装插件:Vimperator

    很多想到没想到的东西都同时搞定,呼呼 

  • 写这篇文章的时候还是firefox 2.0, 而且未发现还有Vimperator这个firefox的插件。建议想在firefox中使用vi方式的兄弟直接装插件。

    由于使用vi习惯,经常在firefox里想用"j","k"键去向下翻页.

    Google一下,还真有人和我想法一样:

    http://johan.fredin.info/firefox_vi-bindings.html
    详细内容为:
    http://www.mozilla.org/unix/customizing.html
    步骤为:
    在Firefox_Install_Dir}\res\builtin\下建立文件userHTMLBindings.xml 文件.
    文件内容为


    <?xml version="1.0"?>
    <!-- In order to work correctly, this file must be named -->
    <!-- res/builtin/userHTMLBindings.xml in the mozilla tree. -->
    <bindings id="htmlBindings"
        xmlns="http://www.mozilla.org/xbl"
        xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      
        <binding id="browserUser">
            <handlers>
                <handler event="keypress" key="k" command="cmd_scrollLineUp"/>
                <handler event="keypress" key="j" command="cmd_scrollLineDown"/>
                <handler event="keypress" key="l" command="cmd_scrollRight"/>
                <handler event="keypress" key="h" command="cmd_scrollLeft"/>
            </handlers>
        </binding>
    </bindings>


    试着做了一下,完全不行,后来发现是firefox 2 .0的架构和以前不太一样,于是继续Searching....终于发现Emacs爱好者修改Firefox key binding的文档

    http://kb.mozillazine.org/Emacs_Keybindings_(Firefox)

    照意思...firefox 2.0已经将key_binding的xml文件打包进{Firefox_Install_Dir}\chrome\toolkit.jar文件里...

    再试:

       1. 找到toolkit.jar文件{Firefox_Install_Dir}\chrome\toolkit.jar
       2. 解压文件: jar -xf toolkit.jar
       3. 修改 content\global\platformHTMLBindings.xml文件<binding id="browser">下加入

          <handler event="keypress" key="k" command="cmd_scrollLineUp" />

          <handler event="keypress" key="j" command="cmd_scrollLineDown" />

          <handler event="keypress" key="h" command="cmd_scrollLeft" />

          <handler event="keypress" key="l" command="cmd_scrollRight" />

       4. 打包文件: jar -cf toolkit.jar
       5. 重启firefox


    ok,现在"k,j,h,l"分别代替上下左右键,快捷多了... :D

  • BlogBus写新日志时不能粘贴的解决方法:
    在firefox的配置目录
    windows:
    linux:/root/.mozilla/firefox/[****.default]/
    添加文件user.js
    内容为:
    user_pref("capability.policy.policynames","allowclipboard");
    user_pref("capability.policy.allowclipboard.sites","http://www.blogbus.com");
    user_pref("capability.policy.allowclipboard.Clipboard.cutcopy","allAccess");
    user_pref("capability.policy.allowclipboard.Clipboard.paste","allAccess");