How to change key-bindings in firefox?

7,458

I have to disable/enable an add-on to reload /usr/lib/firefox/omni.ja.

Share:
7,458

Related videos on Youtube

kev
Author by

kev

Updated on September 18, 2022

Comments

  • kev
    kev over 1 year

    Firefox constantly keep moving platformHTMLBindings.xml when it upgrade.
    I want to replace it to support vi key-bindings. But I cannot find it any more.

    sudo find / -name platformHTMLBindings.xml -o -name toolkit.jar -o -name omni.jar
    

    Thanks for your help.

    Edit:

    I finally found it. It's called omni.ja now.


    This is my editing to platformHTMLBindings.xml:

      <binding id="browser">
        <handlers>
          <handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" />
          <handler event="keypress" key=" " command="cmd_scrollPageDown" />
    
          <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" />
    

    After Editing, I restart firefox, and clear the cache.
    chrome://global/content/platformHTMLBindings.xml is correct.
    But the j/k/h/l shortcuts didn't work.

    • Admin
      Admin about 12 years
      Submit it as an answer instead of comment if your question is solved so that people knew that it is answered.
    • Admin
      Admin about 12 years
      @mac Haven't solved yet. Because after changing platformHTMLBindings.xml, nothing happened.
    • Admin
      Admin about 9 years
      Now if you change omni.ja, Firefox recognizes this and says that it needs to restart
    • Admin
      Admin about 9 years
      @kev where did you find commands like cmd_scrollLineUp from?
    • Admin
      Admin about 9 years
      @hatter I use vimperator now. It works very well!
    • Admin
      Admin about 9 years
      @kev I just needed this 'jk-scrolling' functionality. I didn't need all of Vim's keybindings. So this question exactly catered my need.
    • Admin
      Admin about 9 years
    • Admin
      Admin about 9 years
      But this solution has a problem. omni.ja is not preseved across Firefox updates.
  • Yaroslav Nikitenko
    Yaroslav Nikitenko over 6 years
    The first addon no longer works with new Firefox. From addon's page: "Unfortunately, WebExtensions (the new API for Firefox 57+) does not have the functionality for the correct operation of this addon in Firefox. So this addon will no longer work with the release of Firefox 57 in November 2017! This is the inevitable change in Firefox - all Xul-addons will die out in Firefox 57" addons.mozilla.org/en-US/firefox/addon/s3menu-wizard