Make Firefox behave more like Safari

November 06, 2004

Reading time ~1 minute

I use Command-Up and Command-Down in Safari all the time. They are equivalent to the home and end keys, but they are a lot easier to use because there is a Command key right next to the arrow keys on my PowerBook keyboard, but the fn key is the other side of the keyboard and therefore needs two hands. Another pair of useful keystrokes is Command-Left (Back) and Command-Right (Forward).

To make these work in Firefox, you have to edit one of the files, /Applications/Firefox.app/ Contents/MacOS/res/builtin/platformHTMLBindings.xml.

Open that file in an editor and find the section that starts <binding id="browser">. Inside that section you'll see a load of <handler event="keypress"... lines. Add the following lines somewhere in that section:

<handler event="keypress" keycode="VK_UP" modifiers="accel" command="cmd_scrollTop"/>
<handler event="keypress" keycode="VK_DOWN" modifiers="accel" command="cmd_scrollBottom"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="accel" command="Browser:Back"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="accel" command="Browser:Forward"/>

Save the file and restart Firefox to apply the changes. Don't forget though, because you've edited one of the files included in Firefox.app, if you upgrade Firefox you'll need to apply the changes again. There is supposed to be a mechanism whereby you can make the change in your user profile directory, but that feature is currently broken.

The Lexus LS600hL RSR

I bought a new car! After 12 years I'm driving a Lexus again. Back in 2011I sold my lovely LS400 to buy a Prius, and I sold the Prius in ...… Continue reading

MINI F54 (Clubman) rear seat repair

Published on June 12, 2017

LS400 ride height sensor repair

Published on November 23, 2009