posted to this is not a weblog
on nov 16th, 2005

tagged mozilla, nerd
and never commented on

share this page

vi-key navigation in firefox has been busted for a long time. i was using the keyconfig extension for a while to re-activate this behavior, but the extension doesn't work in firefox 1.5.

here's how to re-enable it without an extension in 1.5 (rc2 here):

$ cd /Applications/Firefox.app/Contents/MacOS/chrome/
$ unzip toolkit.jar content/global/platformHTMLBindings.xml
Archive:  toolkit.jar
extracting: content/global/platformHTMLBindings.xml
$ $EDITOR content/global/platformHTMLBindings.xml

on line 146, insert these lines before the closing </handlers> tag:

<handler event="keypress" key="h" command="cmd_scrollLeft"/>
<handler event="keypress" key="j" command="cmd_scrollLineDown"/>
<handler event="keypress" key="k" command="cmd_scrollLineUp"/>
<handler event="keypress" key="l" command="cmd_scrollRight"/>

save and exit editor. update the jar with the new file and cleanup:

$ zip -f toolkit.jar content/global/platformHTMLBindings.xml
freshening: content/global/platformHTMLBindings.xml (deflated 91%)
$ rm -r content

(re)start firefox and j and k should work as expected.

leave the first comment or contact me

if you want to be able to mark your comment as authentic or delete it later, include your e-mail address (it won't be shown on the site). you'll be e-mailed instructions with a copy of your comment.

basic html allowed; be nice
required


optional


optional