Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Change Home/End behavior in Firefox and Thunderbird Apps
Ever since I got my nice new iMac, I've been driven spare by its weird Home/End key behaviour (jumping to the top or bottom of the entire document, instead of the start/end of a given line). This isn't escapee PC-weenie whingeing, either; I'm a Solaris admin, and these keys behave correctly on that OS, and on every Linux machine I've used. Thanks to a fellow sufferer, Kate@Sun, we have a solution:
  1. Unzip or jar extract the contents of /Applications » Thunderbird.app » [Control-click and show package contents] » Contents » MacOS » chrome » toolkit.jar into a temporary directory.
  2. Replace the file content » global » platformHTMLBindings.xml with this one. Do check this file first for nasties (there shouldn't be any).
  3. Zip or jar to recreate the archive (jar cvf toolkit.jar content/) and replace the original. Wise OS X users will have backed up the original first -- but I don't need to tell you that ...
Do the same, substituting Firefox.app. for Thunderbird.app and enjoy correct Home/End key behaviour ... and Kate asks "Anyone know how to package this up as a patch?"

[robg adds: Personally, I like the current behavior, but understand that some find it quite annoying. In testing this hint, I had some troubles with step one, but Google found this page in the MozillaZine Knowledge Base that explains exactly what you need to do -- jump down to the Any OS, without GTK section for the details. Additionally, you can remap these keys across all applications by following the directions in this blog post (I haven't tested that one). Finally, we have this detailed hint (which includes a link to a very detailed article) on customizing key bindings in Cocoa applications.]
    •    
  • Currently 2.50 / 5
  You rated: 5 / 5 (6 votes cast)
 
[26,779 views]  

Change Home/End behavior in Firefox and Thunderbird | 22 comments | Create New Account
Click here to return to the 'Change Home/End behavior in Firefox and Thunderbird' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change Home/End behavior in Firefox and Thunderbird
Authored by: ra5ul on Mar 23, '07 08:32:07AM

you only need one step: jar uf /path/to/toolkit.jar /path/to/platformHTMLBindings.xml

but this is no good either, since it resets after every firefox update. use the keyconfig extension.

note that the system-wide hack won't work here, since these aren't cocoa apps.



[ Reply to This | # ]
correction
Authored by: ra5ul on Mar 23, '07 08:48:55AM

wait, i think the xml file has to match the archive structure. so:
jar uf .../toolkit.jar content/global/platform*.xml

again, just use the keyconfig extension.



[ Reply to This | # ]
ugh
Authored by: ra5ul on Mar 23, '07 10:37:24AM

wait, i don't think keyconfig can determine when a textfield has focus. i guess it won't work after all.



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: mortimerpa on Mar 23, '07 08:34:04AM

Or just use ctrl+left and ctrl+right to go to the beginning or end of the line.



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: beepotato on Mar 23, '07 09:50:51AM

Or command-left and command-right for the same thing.
Which goes well with command-up and command-down to go to the beginning or end of the document (with the insertion point, unlike what home and end do).

And option-up and option-down to go to the beginning or end of the paragraph.
Not to mention option-left and option-right to jump to the beginning or end of the current word.

To me, it seems more useful to learn these few key combinations rather than try to stick to using home and end, which by comparison only provide limited functionality.



[ Reply to This | # ]
Didn't work.
Authored by: n8gray on Mar 23, '07 10:44:33AM
Or just use ctrl+left and ctrl+right to go to the beginning or end of the line.

Hmm, I tried that and it didn't change the behavior of Home/End at all! Funny, it doesn't seem like this comment is very helpful...

[ Reply to This | # ]

Change Home/End behavior in Firefox and Thunderbird
Authored by: bkemper on Mar 23, '07 09:41:15AM

Oy. Keyboard editing is one of the things that make the Mac so superior to Windows (or other UNIX based OS's, apparently). Just because you are used to doing something one way does not mean that it is better or "correct".

In applications that use standard Coca text panes, arrow keys are generally for moving distances based on the text, and the grouping of keys above those are for moving distances based on the window contents.

Thus, if you want to move a whole page at a time (where "page" means what is visible in the window) or a whole document at a time (where "document" means the entire contents of the window, including what is scrolled out of view), then you would use the grouping of keys that includes page up and page down. "End" goes to the end of the document, "Home" goes to the home (beginning) of the document.

The right and left arrow keys will move you right and left, either one letter at a time, one word at a time when holding down option/alt, or one whole line at a time (that is, to the beginning or end of a line) when holding command (the key with the apple and/or cloverleaf thing on it). Similarly, the up and down arrow keys move you up and down one line at a time, or one paragraph at a time when holding down option (holding down the command key will replicate the behavior of page up and down, since that is the next largest logical increment of movement).

The scheme means that your right hand is usually on the set of keys that you need for the type of moving around that you need. Holding down the shift keys with any of these combinations also selects the text.

It drives me crazy when I have to use a non-Mac machine (or Microsoft Word)where the keys don't work "correctly". If I already have my hand on the arrow keys for moving around within some text, why would I want to move to a different set of keys to go to the beginning or end of a line? And why is there no obvious way of jumping to the beginning or end of a document?

And for that matter, why does clicking on a single line text field in Windows or Word cause an automatic "select-all" of it? If I want to select all, I will use the "select all" keyboard shortcut (except that, IIRC, it inexplicably doesn't work in Windows single line fields).

FireFox is not a Cocoa app, but it does try to follow the Macintosh UI standards. Camino does a much better job (if you like the Mozilla engine), and of course Safari reigns supreme.



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: pascalpp on Mar 23, '07 10:41:57AM

RobG, you should create a 'Switcher' category of hints and post the above comment as the first hint in that category. Maybe edit it for snarkiness. : )



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: n8gray on Mar 23, '07 11:00:51AM
Keyboard editing is one of the things that make the Mac so superior to Windows (or other UNIX based OS's, apparently). Just because you are used to doing something one way does not mean that it is better or "correct".

Meditate upon these words, young Grasshopper. When you are suffused with embarrassment, then you will have achieved enlightenment.

[ Reply to This | # ]

Change Home/End behavior in Firefox and Thunderbird
Authored by: nmerriam on Mar 23, '07 12:16:00PM

I have to admit, there were a lot of things that threw me off when I switched to the Mac, and this was one of them. Amazingly enough, once I simply accepted how it worked and tried to see the logic in Apple's design, 98% of the changes were superior, and more logical.

There are very few choices Apple made in system behavior that are "bad", and many of them stem from what was logical years ago but is no longer so (to which I say they should update the behavior to be logical now, but I can understand the desire for consistency).

Stop fighting it, and you may find out as I did that it makes a heck of a lot more sense to do it the Apple way then to do it the way you're used to.



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: pecosbill on Mar 24, '07 08:41:50PM

I cannot agree more. I can't stand having a commonly used key in Windoze like home or end right next to a destructive key (forward delete). I use home / end on the Mac some, but much less so I take the time to target the right key.

---
Pecos Bill



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: n8gray on Mar 23, '07 10:52:46AM

Great hint! It came a bit too late for me, since I recently lost patience with Thunderbird and went back to Mail.app for just this reason. When I get fed up with Mail.app (as I always do) and try Thunderbird again I'll give this a shot.

Also, RobG's comments are not correct. The "across all applications" remapping only works for cocoa apps.



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: splatkus on Mar 23, '07 01:12:38PM

"I'm a Solaris admin, and these keys behave correctly on that OS, and on every Linux machine I've used."

No those keys don't behave correctly on those OSes. If they did, they would jump to the beginning and end of the document.



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: bloodnok on Apr 29, '08 09:39:02AM

d'oh! didn't mean "correctly", i meant "the way i'm used to ..." no offence was intended.



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: DavidRavenMoon on Mar 23, '07 01:17:29PM

Am I missing something?

In Safari, the Home and End keys also take you to the top and bottom of the page. This is the way I believe it should be. This is why they are marked Home and End!

To get to the beginning of the next line, the proper keys to use are Page Up and Page Down, or SpaceBar/Shift SpaceBar.

---
G4/Digital Audio/1GHz, 1 GB, Mac OS X 10.4.9 • www.david-schwab.com • www.myspace/davidschwab • www.imanicoppola.net



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: mariuss on Mar 23, '07 05:37:05PM

The platformHTMLBindings.xml linked in the hint will not work with Thunderbird, at least it did not work for me.

Also, I saw that there are lots of reactions to this hint telling people to stop fighting and get used to the Mac OS specific key bindings. Well, this may or may not work. I am using a Mac as a secondary platform, and the Home/End behavior is a major pain. I cannot get used to it since the other platforms I use do not behave this way. It would be really nice if there was a system preference somewhere to switch this behavior.

Marius



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: starwxrwx on Mar 24, '07 02:43:28AM

I'm considering changing my Home/End behaviour even though I have become accostomed to it in OS X - mainly because SOME apps don't honour it - eg Adium which switches tabs with CMD-left/right. Or Safari which switches with CMD-SHIFT-left/right (ie highlighting to the end of the line - and yes while in a text box it doesn't switch tabs... but that's annoying when I DO want to switch tabs!).



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: Grommet on Mar 25, '07 05:30:06PM

Safari's default method to change tabs is actually Command-Shift-{ and Command-Shift-}

Check your Window menu, it's in there.

That lets me switch tabs while keeping focus in a text field in a different tab.



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: miggins on Mar 25, '07 08:09:46PM
DoubleCommand (http://doublecommand.sf.net) will make Home and End work just like Command+Left/Right Arrow, so that might make you more comfortable if you really need "PC style" Home and End keys.

[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: hoagy on Mar 27, '07 02:04:05PM

For me, correct/incorrect translates to effort. I am a firmware programmer and I need to take the cursor to the beginning or end of a line 1000 times a day. Would I rather use a single key or a key combination? Hmm.. me thinks my answer is clear.

These hints are very helpful. Now if I could just get rid of this horrible mouse acceleration curve that Apple has forced upon me.



[ Reply to This | # ]
Change Home/End behavior in Firefox/Thunderbird
Authored by: bloodnok on Mar 26, '08 07:16:32PM

well i got fatigued with having to type in the commands listed in my hint every time the mozilla folks updated the browser & mail client. so i wrote a simple bash script to make life easier. it's called mozkey & is called with no argument to change firefox & with tb as its argument to change thunderbird. any other argument throws an error. get mozkey here.

hope this helps ...



[ Reply to This | # ]
Change Home/End behavior in Firefox and Thunderbird
Authored by: jryans on Jul 12, '13 09:19:50PM
I recently added basic support for the DefaultKeyBinding.dict file to Firefox 25, so you can now use that (such as in this example) to get the Home / End functionality you expect.

[ Reply to This | # ]