KeyFixer – Firefox Version

To help in the ongoing search to make the “home” and “end” keys work in Mac OS X like they work in other operating systems, I give you the Firefox version of KeyFixer. (See here and here for background on the problem and info on how to fix this issue in other apps besides Firefox).

While I believe that this software will not harm your system in any way, it is offered to you for FREE with NO GUARANTEE! This patch for Firefox has been tested by several brave beta testers, and as far as I know, it won’t damage Firefox in any way. I would however, recommend making a backup of your Firefox.app before running this patch. KeyFixer will only try to patch versions of Firefox 2.x found in your Applications folder. Also note that you’ll need to re-run the patch each time you update Firefox.

So, what does the patch do? It simply replaces the platformHTMLBindings.xml file buried deep within a .jar archive inside Firefox.app with a new version that contains fixes to make the home and end keys work correctly. Thanks to everyone who tested this and helped by making suggestions and submitting code. Please post your feedback in the comments section.

Download KeyFixer for Firefox – version 0.2

Also try the regular version of KeyFixer for fixing the home and end keys in other Mac OS X applications.

50 Responses to “KeyFixer – Firefox Version”

  1. J. Perkins 23. Apr, 2007 at 5:00 pm #

    Could you (if you haven’t already) send this on to the Firefox team? I would love to see this as the default behavior in Firefox. Thanks for your persistence on getting this fixed!

    • NBS 12. May, 2010 at 5:35 am #

      Hi, I try to fix the home and end key. It work on TextEdit and some other but it doesn’t work on Eclipse. I was windows user and if it doesn’t work home and end key, its very difficult to coding in eclipse. Please help me to fix for eclipse.

  2. Amanda 30. Apr, 2007 at 10:03 pm #

    It works beautifully!!! Thank you so much!!! :)

  3. Hay 09. May, 2007 at 12:58 am #

    Works very well indeed. Thanks for the fix!

  4. ChopOMatic 28. Jun, 2007 at 12:43 am #

    THANK YOU THANK YOU THANK YOU!!!

  5. grod 31. Jul, 2007 at 9:32 pm #

    Wonderful. Using a mac every day is now slightly less distasteful. Could you make one for thunderbird, as well?

  6. Hay 03. Aug, 2007 at 1:05 am #

    Is there some kind of uninstaller for this program? I found a more general solution for the home/end key thing with the utility DoubleCommand (http://doublecommand.sourceforge.net/). This app seems to work perfectly except for…Firefox, which is (i guess) because of this script i installed earlier.

  7. Jim 04. Aug, 2007 at 5:29 am #

    Hay,
    There’s no uninstaller, but since it only changes one file inside Firefox.app, “uninstalling” it can be easily accomplished by upgrading to the newest version of Firefox or by simply replacing your Firefox.app with a new copy.

  8. Blue 05. Aug, 2007 at 5:06 am #

    THANK YOU!!!

  9. Janice Chong 08. Aug, 2007 at 6:57 am #

    I downloaded Keyfixer and Keyfixer Firefox but when I write emails in yahoo, the home and end buttons still doesn’t work? What is the problem here? I do have a new version of Firefox.

  10. Dushan 13. Aug, 2007 at 10:08 pm #

    Thanks for both of the KeyFixer apps. There is one more place I’d much appreciate its operation: in ThunderBird. Is there a way of using the Firefox version to do its job on TB also? Thanks.

  11. Brian F. 02. Oct, 2007 at 12:47 am #

    Thank you so much. I have been dying since I switched platforms. Shift – End/Home was a huge shortcut for me on my PC. You have saved my life!!!! :)

  12. Ben Williamson 16. Oct, 2007 at 10:48 am #

    Thankyou – great work. Have you considered taking this further, by submitting a patch to the Firefox maintainers that adds a checkbox to Preferences, or at least about:config? That would indeed be the cool official way to go.

  13. Ned 20. Oct, 2007 at 9:42 pm #

    Great work… this is a constant frustration as a switcher. Could this be rolled into a firefox extension? I have never made one, but it may be worth looking into for anyone with any experience in this.

  14. MikeFM 12. Nov, 2007 at 9:47 pm #

    You should make this available as a Firefox/Thunderbird extension so that it’ll be re-applied after updating those apps.

  15. Tommy Thorn 19. Nov, 2007 at 4:43 am #

    Thanks a lot. Unfortunately, I came to this site in after experiencing the frustration with Thunderbird, and that’s about the only app not supported :-(

  16. A E 26. Nov, 2007 at 12:52 am #

    Can you tell us how to do it manually? Nice work btw!

  17. Jim 26. Nov, 2007 at 10:01 am #

    How to do it manually: http://www.starryhope.com/tech/2006/mac-os-x-home-and-end-keys/

  18. Ibrahim 23. Dec, 2007 at 8:33 pm #

    Hi there,

    Excellent stuff. Just one thing, can you please port it to Firefox 3?

    Firefox 3 looks good on Leopard so I’m using it instead of FF 2.

    Many Thanks.

  19. Ibrahim 23. Dec, 2007 at 9:03 pm #

    Figured it out. Here’s how to patch Firefox 3.

    (I’m using 3.0b2 currently…)

    1. Close Firefox
    2. Browse to Applications > Firefox
    3. Right Click > Show Package Contents
    4. Browse to Contents > MacOS > Chrome
    5. Rename/Remove toolkit.jar and replace it with this (http://qelix.com/work/firefox3/toolkit.jar) updated one.

    Thats all. :-)

    Hope it helps some.

  20. Derek 13. Jan, 2008 at 10:13 pm #

    Thank you so wonderfully much. You’ve just made my life 10 times better!

  21. E O 24. Jan, 2008 at 2:13 am #

    THANK YOU, THANK YOU, THANK YOU! It’s only my 3rd day on a Mac and this one issue has cut my productivity in half, I swear. It doesn’t seem to work in Mac Mail, but I’m grateful wherever it does work. :)

  22. E O 12. Feb, 2008 at 8:29 pm #

    It’s now working in Apple Mail, but now i’ve switched to Thunderbird. Pleeeease make a patch for Thunderbird. Please?

  23. Brian F. 15. Feb, 2008 at 8:30 pm #

    THANK YOU!!!!!!!!!!! The firefox patch is great! When it upgraded, it left me hopeless. Thanks for saving my life!!!!!!!

  24. Decavolt 27. Feb, 2008 at 12:58 am #

    Heya Jim. I’m a huge fan of this, great work. It’s one of the essentials that I can’t live without.

    I started using Flock recently and realized that I needed the same fix. Since Flock and Firefox are both Mozilla-based browsers, I modded this script just a little to work for Flock as well.
    The Flock-modded Keyfixer is on my site for download if anyone would like it.
    http://www.decavolt.com/2008/02/modified-keyfixer-for-flock/

  25. Ariel 17. Mar, 2008 at 6:52 am #

    Thanks a lot! This has been driving me crazy once I installed Firefox on my new Mac.

    Ariel

  26. Rainer S. 17. Mar, 2008 at 2:52 pm #

    Hi,
    Thanks for the great tool. I’m a developer switched from windows to mac osx.
    Does anybody know how to activate the same feature in eclipse?
    Again – Thanks a lot
    Rainer

  27. Chris Morse 21. Mar, 2008 at 9:56 pm #

    I just discovered that Thunderbird uses the exact same platformHTMLBindings.xml (I diffed it) file so I was able to replace it with the version in this package and now Thunderbird behaves right too.

    I also added the following handlers so PC-style Ctrl-Home/End and Shift-Ctrl-Home/End works right too (using Command-Home/End)

    Cheers

  28. Jeremy Wesley 07. May, 2008 at 3:39 am #

    The Fix above for Firefox 3.0b2 doesn’t work for 3.0b5 – address bar disappears. I don’t know enough to fix this in the jar.

  29. Matt Ball 11. May, 2008 at 9:14 am #

    I’ve created keyfixer_firefox v0.3 to address some problems people have seen. Here are the highlights:
    * Support for both Firefox 2 and 3 (versions on or after May 2008)
    * Running the program twice will uninstall the patch. This is useful when performing upgrades (Firefox won’t upgrade if Keyfixer has been applied — you have to remove it first)
    * PageUp and PageDown now moves the cursor instead of just moving the screen. This is more consistent with Firefox on Windows.

  30. PJ 26. May, 2008 at 12:45 am #

    Wow. I haven’t heard of this firefox plugin til now. Thanks buddy! I still haven’t upgraded to FF3 yet.. gonna wait a bit for that.

  31. f00fighter 24. Jun, 2008 at 2:16 am #

    Any chance you will update this for Firefox 3??

  32. Shanman1 27. Jul, 2008 at 7:41 pm #

    Jim, thank you so much for taking the time to make this application. If you do decide to update this for Firefox 3, I know there will be a lot of users appreciating your efforts. Thanks again!

  33. Keeto 30. Jul, 2008 at 10:53 am #

    Since there’s no update yet for Firefox 3, I guess we’ll just have to do it manually. I’ve uploaded the necessary jar file to make this work on Firefox 3 (I’m using 3.0.1, btw).

    1. Download the new “toolkit.jar” file from http://localhostr.com/files/472b85/toolkit.jar. After downloading, quit Firefox.
    2. Go to your Applications folder, select Firefox and Ctrl+Click (Right Click) and select “Show Package Contents”
    3. Navigate to “Contents/MacOS/chrome” and make a backup of your original toolkit.jar file by adding a “.bak” extension to make it “toolkit.jar.bak”
    4. Drop the new “toolkit.jar” file that you downloaded from step 1 and start Firefox.

    Hope this helps..

  34. gbrugman 23. Aug, 2008 at 7:18 pm #

    To bad, it didn’t work for me in this version of Mac OS X 10.5.4 and Firefox released version 3.0.1. Would the toolkit.jar may be language dependent, I’m using the Dutch version of Mac OS X and Firefox?

  35. Matt Ball 24. Aug, 2008 at 12:55 am #

    Keeto, et al, if you’re looking for an update, I suspect you’ll have to search for the many forks of this (apparently) public domain package. As one such project, I’ve posted a keyfixer fork on my blog. This version uses the same code as Keyfixer 0.2, but uses a patching technique instead of a file-replacing technique. The patching approach is able to adapt better to small changes in the XML key binding file from the Firefox team, whereas the file replacement approach will ignore these small changes, making it break sometimes with new Firefox versions.

    There are also many jar file approaches (i.e., replace toolkit.jar with another jar file). These have even greater fragility with Firefox upgrades because numerous files in the jar file are blindly replaced, possibly causing crashes. My recommendation is to avoid the jar file approach and to use the 0.3 version of keyfixer that you can find on my blog. This version has withstood the last couple updates to both Firefox 2.0 and 3.0 and (as of August 2008) still works. I doubt it will work indefinitely, but it seems to be the best we have right now… :)

    Many thanks to Jim Mendenhall for the original version!

  36. Dmitry 21. Mar, 2009 at 1:52 am #

    Thanks a lot! But what about Ctrl+Left/Right acts as step by words in other applications?..

  37. Dmitry Kovba 21. Mar, 2009 at 1:53 am #

    Thanks a lot!
    But what about Ctrl+Left/Right acts as step by words in other applications?..

  38. Ben 22. Jun, 2009 at 5:21 am #

    I’m using Firefox 3.5 beta and I got the script the work. To do so, copy the keyfixer_firefox to your desktop. Right click and browse package contents.

    Navigate to Contents > Resources and open up the file ’script’ with text editor. Remove the version checking and it works fine. Here’s the code to use if you don’t want to figure it out yourself ;)

    #!/bin/bash

    # See if Firefox is already running
    FF_RUNNING=$(ps -ax | grep ‘\/firefox-bin\ ‘)

    if [ "$FF_RUNNING" != "" ]
    then
    echo “Please quit Firefox before running this tool.”
    exit
    else

    FF_VERSION=$(/Applications/Firefox.app/Contents/MacOS/firefox -v | grep -o ‘2\.’)

    echo “Found Firefox 3, moving on”
    # make a backup of toolkit.jar
    cp /Applications/Firefox.app/Contents/MacOS/chrome/toolkit.jar /Applications/Firefox.app/Contents/MacOS/chrome/toolkit.jar.backup
    # make a copy of toolkit.jar in /tmp
    cp /Applications/Firefox.app/Contents/MacOS/chrome/toolkit.jar /tmp/toolkit.jar
    # unzip toolkit.jar
    cd /tmp/
    unzip -oq toolkit.jar
    # copy new platformHTMLBindings.xml
    cp $1/Contents/Resources/platformHTMLBindings.xml /tmp/content/global/platformHTMLBindings.xml
    # re-jar the files
    jar cf toolkit.jar content
    # copy this new toolkit.jar file back into Firefox
    cp /tmp/toolkit.jar /Applications/Firefox.app/Contents/MacOS/chrome/toolkit.jar
    # Cleanup
    rm -rf /tmp/content
    rm /tmp/toolkit.jar
    echo “Firefox has been patched, please restart Firefox and try your home/end keys!”

    fi

  39. Travis Anderson 06. Jul, 2009 at 9:40 pm #

    This may have worked for the beta, but I’m attempting to use on FF 3.5 since it was released, and the above script is not working, I get the error message that essentially says firefox was not found in the applications folder.

  40. ViRGE 15. Jul, 2009 at 4:59 am #

    For those people looking for a 3.5 compatible version of Keyfixer, it has been supplanted by an add-on of the same name. The add-on means that the keybindings don’t need to be patched for every update of Firefox, rather it’s done at run-time by the add-on.

    https://addons.mozilla.org/en-US/firefox/addon/9796

    There’s also a description of this on a wiki at http://mavaball.net/wiki/index.php/Keyfixer

  41. Ben 30. Jul, 2009 at 7:02 pm #

    I am trying to do this with FF 3:

    Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1

    and I get this error:

    /Volumes/keyfixer_firefox/keyfixer_firefox.app/Contents/Resources/script:
    line 14: [: =: unary operator expected
    Firefox 2 not found in /Applications directory

    Any chance of allowing us the source to fix? Thanks, Ben

  42. Raquel 06. Nov, 2009 at 10:42 pm #

    Getting errors trying to run the key fixer for firefox. I am in snow leopard with firefox 3.5.5

Trackbacks/Pingbacks

  1. KeyFixer - Fix Your OS X Home and End Keys - Starry Hope Productions - 20. Apr, 2007

    [...] Update: There is now a version of KeyFixer for Firefox. Check it out. [...]

  2. P0L0’s Blog » Blog Archive » Arreglar Inicio/Fin en Firefox2 - MacOSX - 10. Jul, 2007

    [...] falla el tema de las teclas de inicio y fin. Asi que investigando un poco me he encontrado con KeyFixer Firefox Como me interesaba como funcionaba he mirado lo que hay dentro del .app y realmente es super [...]

  3. OnyxRaven Blog » Fixing Home/End keys in OS X apps - 06. Dec, 2007

    [...] fix this, there are a couple places to go.  First grab both these versions of KeyFixer, which patch base OS X (which it seems few apps grab their settings from), and Firefox [...]

  4. Home/End KeyFixer for Firefox 3 - 23. Dec, 2007

    [...] Credits to StarryHope for making the original [...]

  5. Move Word Back/Forward in Firefox (OS X) - 22. Jan, 2008

    [...] excellent KeyFixer for Firefox 2 (and here’s a patch for Firefox 3) fixes your Home/End [...]

  6. Mac Software : The New Wolfs Howl - 16. Mar, 2009

    [...] quite annoyed by the fact that they don’t work like that in OS X. Previously, I’ve used KeyFixer to solve this issue, but it’s not perfect and doesn’t seem to work with every [...]

  7. Got A New Mac » Blog Archive » End & Home Keys - 01. Jun, 2009

    [...] KeyFixer – Fix Your OS X Home and End Keys (doesn’t work for Firefox so you’ll need the next add on) KeyFixer Firefox Edition [...]

Leave a Reply