KeyFixer - Fix Your OS X Home and End Keys
November 14th, 2006
Update: There is now a version of KeyFixer for Firefox. Check it out.
A few months ago, I wrote a short article about how to fix the “home” and “end” keys in OS X. I published a step-by-step guide to adding your own custom key bindings via the command line. Many people found this too much of a pain, so I decided to make an easy clickable solution.
I wrote a quick shell script to copy a custom DefaultKeyBinding.dict into the current user’s Library folder. Then, with the help of Platypus, I made it a nice clickable application.
To fix your “home” and “end” keys (as well as “page up” and “page down”), just download and run KeyFixer. If you already have a DefaultKeyBinding.dict file, the script will exit without making any changes.
If you want to remove the changes that KeyFixer makes, just run the following command in Terminal.
rm ~/Library/KeyBindings/DefaultKeyBinding.dict
Please note that this software has only been tested on Mac OS X 10.4 and it does not fix the home and end keys in every program. While I believe that this software will not harm your system in any way, it is offered to you for FREE with NO GUARANTEE! Please post your feedback in the comments section.
Applications where this fix works (and doesn’t):
- TextEdit - works
- TextMate - works
- Pages - works
- Most text editors - works
- Safari - works (in form fields only)
- Firefox - doesn’t work (but fixed it with KeyFixer Firefox Edition)
- iTunes - doesn’t work




November 14th, 2006 at 12:17 pm
[...] Note: Now you can skip all these instructions and just download my KeyFixer application to fix your home and end keys. Read the new article … [...]
November 19th, 2006 at 8:04 pm
Doesn’t seem to work on Xcode either
November 20th, 2006 at 10:55 pm
You can set the keys on Xcode explicitly in the preferences.
November 23rd, 2006 at 4:13 pm
In Safari it works on webpage input boxes, but doesn’t work in the address bar!
Any further solution for this?
December 18th, 2006 at 10:44 pm
The one place I wanted this to work, the terminal, it does not…..
December 21st, 2006 at 9:08 pm
Great little app, Jim!
In case you’re interested, I also came across this blog entry (http://weblog.0×7b.com/articles/2005/09/25/windows-keyboard-mapping-for-osx) which covers some of the same ground — and, in addition to the keybindings that KeyFixer takes care of, that entry also lists two more, for Ctrl+Home & Ctrl+End:
“^\UF729″ = “moveToBeginningOfDocument:”; /* control + home */
“^\UF72B” = “moveToEndOfDocument:”; /* control + end */
December 24th, 2006 at 3:43 am
[...] Another keyboard related problem is the way the home and end keys operate in OSX. In Windows, home and end move you to the beginning and the end of the current line. Hitting ctrl+home and ctrl+end moves you to the beginning and end of the document. In OSX, home and end does what ctrl+home and ctrl+end does in Windows. What this means is that there is no quick way to move the cursor to the beginning and the end of the current line. Most people probably never touch the home and end keys, but I use them constantly, so this is very annoying. I’m not sure which method is “correct”, but I definitely prefer the way it works in Windows. You can duplicate the behavior with command+left and command+right, but it’s a lot more cumbersome and if you do it in a textarea, Firefox thinks you want to navigate to the previous page. There’s some light at the end of the tunnel though. There’s a small app called KeyFixer that sets some custom key bindings in your Library folder. Only problem is it doesn’t work everywhere. Firefox for example, completely ignores it. As does Safari in it’s address and search bars. [...]
December 28th, 2006 at 8:38 am
Ohh, I desperately need this to work in Firefox — especially on my MacBook where the Home and End keys are already a two-hand operation (one of my biggest pet peeves about the Mac portables, ugh).
I type a LOT in Firefox, and Eudora as well, where it apparently also doesn’t work. Will keep checking for updates!
January 30th, 2007 at 6:33 am
For my purposes.
Thank you Very Much
February 6th, 2007 at 4:57 am
Great, thanks a lot! All I need now is Firefox support to complete my switch :)
February 9th, 2007 at 6:53 am
Thanks heaps! This utility is wonderful! The thing I have hated most since starting to use OS X is that the Home & End keys did not function properly, and now they do. It works in Mail.app too which is where I’ll use it most.
Thanks again
February 9th, 2007 at 5:20 pm
This post on o’reilly (http://www.oreillynet.com/linux/blog/2006/04/firefox_with_vim_keybindings.html) gives some clues to how to do it, although only on an application-wide scale. I’ve altered a file for Firefox (2.0.0.1) which fixes these, but there might be things which are just my personal preference.
Stuff I’ve removed or added is commented with ‘Removed’ or ‘Added’.
I’ve put up the jar replacement up at http://www.marcuscobden.co.uk/stuff/toolkit.jar.
Let me know if it’s any use you.
February 11th, 2007 at 6:27 pm
I tried the JAR, seems to be working just fine :)
February 14th, 2007 at 10:53 am
[...] How cool is this? Jim Mendenhall at Starry Hope offers some help to us Mac Switchers. Long one of the top Google results for “osx home end“, Jim developed a small app to replace the Mac’s default key behavior with that of every other windowing system ever. (That’s right, nitpickers. Ever.) Unfortunately, it didn’t work in Firefox… until now! [...]
February 16th, 2007 at 9:33 pm
Tried the JAR method above and it worked! You can do it one of two ways:
1. save the above toolkit.jar file over the existing one
2. merge the single changed document into your current .jar
If you want to do #2 (package JUST the changed platformHTMLBindings.xml file), see below.
For those of you not knowing the details of the command line options here are the highlights. Do NOT follow these commands blindly, know what they do, as many will need modifying if you have placed files or apps(firefox) into different directories than me. The “man ” command is your friend :-)
Download the toolkit.jar to your desktop
cd ~/Desktop/
jar xvf toolkit.jar
;this extracts the jar (which happens to be directories called “content” and “__MACOSX” with much inside of content. All you should need is the “content” dir) x=eXtract v=verbose
jar xvf /Applications/Firefox.app/Contents/MacOS/chrome/toolkit.jar
;extract the existing toolkit.jar file in the firefox app
rm -r __MACOSX/
;recursively removes the unneeded directory that came out when u unjar’ed the first file
mv ./content/global/platformHTMLBindings.xml /Applications/Firefox.app/Contents/MacOS/chrome/content/
;move the new file to the location with the your current .jar contents
cd /Applications/Firefox.app/Contents/MacOS/chrome/
jar cvf toolkit.jar content
;create a jar file with the old contents + the newly moved .xml file
AGAIN, know what these commands are doing. I didnt do a real test, so I may have slightly buggered up the commands. Gives you a good idea though.
February 16th, 2007 at 9:54 pm
Forgot a couple things in the walk through above.
1. This can be done the same way on thunderbird
2. backup your old toolkit.jar with something like ‘mv toolkit.jar toolkit.old.jar’
3. remove the temporary ‘content’ directories with ‘rm -r content/’
March 10th, 2007 at 6:28 am
Wow, very nice! I have a Mac and PC on my desk and go back and forth between them, so anything that makes the key bindings more similar helps.
Re: joe above wanting it work in Terminal. I tried rebinding the keys in bash by modifying .inputrc without success (I think Terminal was eating them) but what does work nicely is to go to Terminal -> Window Settings -> Keyboard and tell “Home” to send string control-A, and “End” to send string control-E. Probably the same method could be used to pass the keys straight to bash for processing.
April 1st, 2007 at 8:54 pm
Very nice! Thanks! But it doesn’t seem to work with the eclipse IDE.
April 1st, 2007 at 9:03 pm
Here is the solution for eclipse:
http://www.kelek.com/blog/2006/09/16/fixing_home_end.html
April 19th, 2007 at 2:45 pm
Works like I expected home/end keys to work!
It was a real pain writing code without real home/end pgup/pgdwn!
Firefox seems to be a problem it still doesn’t understand those keys in inputs, textarea and url bar, but i can scroll through the page!?
April 20th, 2007 at 2:30 pm
[...] 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). [...]
May 14th, 2007 at 10:33 pm
thanks for the fix!
need a fix for opera though :/
May 21st, 2007 at 11:45 pm
[...] 3) Home and End key madness. Hmm, there are home and end keys and they are in the right place but they have some magic behaviour which does not to put the cursor at the beginning and end of lines. I had to use this and this hack to get something resembling consistently right behaviour. [...]
July 1st, 2007 at 12:24 pm
You’re a life-saver! Thanks a ton man! :-)
July 15th, 2007 at 6:31 pm
[...] Descarga | KeyFixer [...]
July 31st, 2007 at 9:41 pm
It also doesn’t work in Flash in the actions pane.
August 11th, 2007 at 6:08 pm
[...] Similar to the Refresh Finder problem mentioned above, I’ve been able to click the Home and End keys in Windows and (depending on the application) jump to the beginning or end of the line automatically. Mac OS does not do this by default, but this can be fixed using a program called KeyFixer. [...]
August 13th, 2007 at 12:21 am
A big thanksfor KeyFixer (for Firefox and other apps. And thanks to Rob for the instructions on getting Home and End to work properly in Terminal. That was one of the infuriating, perverse apsects about
Mac OS X.
August 15th, 2007 at 2:49 pm
Fantastic!!!
I’m a new Apple convert and this was the most glaring problem I was dealing w/ on a daily basis. Problem solved!
One question? How on EARTH do OSX users pull up the Menu bar using the keyboard? Yes, I know there are lots of shortcuts but in Windows I would frequently just type things I wanted to happen if a shortcut didn’t exist… I.e. In Excel I could hit “Alt” to drop down the Menu bar list. Alt+E (edit) then “S” then “V” (values), then hit Enter and never touch my mouse. Does Apple allow the “First letter of a Menu item” control??? Surely there is a way to @ least drop down the menubar so I can use my arrow keys to select items.?
One more question: Why doesn’t “Alt+Tab” work properly all the time? Sometimes I can Alt+Tab to other programs but sometimes it just brings up the “Header” of the program but not full body of the program so I can begin working in it (and I’m forced to grab my mouse and pull up the dock and click on the app again.)
Any/all Help would be GREATLY appreciated!
Thanks again for KeyFixer!!!
August 29th, 2007 at 1:29 pm
[...] KeyFixer - Fix Your OS X Home and End Keys - Starry Hope Productions To fix your “home” and “end” keys (as well as “page up” and “page down”), just download and run KeyFixer. (tags: macosx hacks keyboard) [...]
September 6th, 2007 at 1:11 am
DoubleCommand takes care of this and much, much more. Plus is works in EVERY program.
September 19th, 2007 at 10:14 pm
“Today is the day” when I got tired of the page up/down behavior… after spending 3 years being frustrated I decided to see if there was a solution! You really saved my day and more days to come! Thank You so much for this nice script.
September 25th, 2007 at 10:26 am
[...] KeyFixer did the trick wonderfully for me. [...]
September 26th, 2007 at 2:56 am
Thanks. I really mean it, I am just trying to get to grips with my new MAC and this was really start to annoy me. Running a PC news and reviews site I will probably get shot for writing here but I now can go back to pretending my MAC is a PC again. Thanks again for a great free app.
October 3rd, 2007 at 8:18 am
Thank you so much! I will never go back to Windows but there are a few things that drive me crazy about the Mac. Wanna know another? There’s no way (that I know of) to tile windows. I sure miss that sometimes when I’m working in two apps at once.
October 11th, 2007 at 11:04 pm
Any chance of having your “app” update the same values for Thunderbird? That is the killer for me. I write about 20 - 30 long emails a day and the end key behavior drives me nuts! Your app worked a treat on FF … just need to sort Thunderbird now.
October 19th, 2007 at 9:32 pm
[...] Fix for home and end keys If you’re anything like me, you are used to having your home and end keys go to the start of the line of text and the end of the line, respectively. The way OS X does it drives me insane, and I’ve finally found a solution that even fixes it in firefox: KeyFixer. [...]
November 6th, 2007 at 4:59 pm
Really cool stuff. Thanks for you effort.
November 6th, 2007 at 9:11 pm
Thanks! You ROCK! This program works perfectly. I will be sending a link to your site to all my Mac friends.
November 16th, 2007 at 12:30 am
Hey, thanks!
This works on Bean as well.
I’ve been wanting something like this forever!
November 17th, 2007 at 6:31 pm
I can´t get it to work… I am using Leopard. Has anyone got it working in Leopard?
November 17th, 2007 at 8:27 pm
Update: Got it working now, great program! Unfortunately it doesn´t work in Thunderbird though. Any ideas of how do fix it in Thunderbird?
November 20th, 2007 at 3:03 am
[...] one major OS X annoyance you can cross off your list. KeyFixer is freeware, Mac OS X only. KeyFixer [Starry Hope]KeyFixer Patch for [...]
November 20th, 2007 at 3:13 am
[...] one major OS X annoyance you can cross off your list. KeyFixer is freeware, Mac OS X only. KeyFixer [Starry Hope]KeyFixer Patch for [...]
November 20th, 2007 at 1:50 pm
Thanks a lot! This is exactly what I am looking for!
November 21st, 2007 at 1:20 am
Didn’t work in BBEdit, but then I noticed an option for it in Preferences ;)
November 27th, 2007 at 11:13 am
Big thanks!
December 16th, 2007 at 10:01 am
thanks very much - i missed this feature as a newbie to mac.
January 10th, 2008 at 5:03 am
As a recent Mac convert, I couldn’t get used to the Mail default text editing keys. Starting with the explanation you posted, and then using information from the definitive discussion of key bindings at
http://www.hcs.harvard.edu/~jrus/Site/cocoa-text.html
and the sample file on
http://www.lsmason.com/articles/macosxkeybindings.html
I created the following slightly modified file. Note that the sample file didn’t work properly on my MacBook Pro with Leopard, but this file does, and adds one more relevant keystroke.
/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
“^\U007F” = “deleteWordBackward:”;
“^\UF728″ = “deleteWordForward:”;
“\UF729″ = “moveToBeginningOfLine:”;
“^\UF729″ = “moveToBeginningOfDocument:”;
“$\UF729″ = “moveToBeginningOfLineAndModifySelection:”;
“$^\UF729″ = “moveToBeginningOfDocumentAndModifySelection:”;
“\UF72B” = “moveToEndOfLine:”;
“^\UF72B” = “moveToEndOfDocument:”;
“$\UF72B” = “moveToEndOfLineAndModifySelection:”;
“$^\UF72B” = “moveToEndOfDocumentAndModifySelection:”;
“^\UF703″ = “moveWordForward:”;
“$^\UF703″ = “moveWordForwardAndModifySelection:”;
“^\UF702″ = “moveWordBackward:”;
“$^\UF702″ = “moveWordBackwardAndModifySelection:”;
“\UF72C” = “pageUp:”;
“\UF72D” = “pageDown:”;
“^z” = “undo:”;
“$\UF728″ = “cut:”;
“$\UF746″ = “paste:”;
“^\UF746″ = “copy:”;
}
There are some oddities about the behaviour of Ctrl+shift+right arrow that I don’t quite understand (it is the only keystroke that doesn’t always seem to take the binding, apparently somehow related to the number of additional keystrokes mapped?!) and it’s not really possible to emulate Ctrl-up/down arrow properly (one can make it move to the beginning/end of the current paragraph but not to the beginning of the next para, which is kind of pointless) but this file makes text editing in Apple Mail much easier for a former PC user with established keyboard reflexes! Llew Mason’s sample file fixes Home/End plus Page Up/Down, provides Ctrl+right/left arrow to move by a word (and one can hold down shift to select) as well as Ctrl-Home/End to move to the beginning/end of the document; plus it adds classic PC editing features of Shift-Del to cut, Shift-Ins (the Help key on a Mac keyboard) to paste, Crtl-Ins to copy and Ctrl-Z to undo. I have got Ctrl-Backspace (Delete on a Mac) to work to delete a word backwards (on my machine it didn’t, using the sample file, nor did Ctrl-shift-right arrow behave) and have added Ctrl-Del (forward Delete on a Mac) to delete a word forwards.
January 27th, 2008 at 5:28 am
[...] this has been a constant frustration. Thank God for google search - I came across the application KeyFixer which makes the home and end keys properly work on Mac OS X for most applications. Some that [...]
February 3rd, 2008 at 4:11 pm
[...] the text navigation keys, but while looking for a way to fix the terminal keys I discovered a way to enable windows-style keys (although making it work on leopard requires info from one of the comments). Yay for windows [...]
February 11th, 2008 at 12:28 pm
[...] Anyway, here is an easy way of fixing it. [...]
February 17th, 2008 at 6:53 pm
Thank you thank you thank you!!! As a recent Windows to Mac convert, I have found every other aspect of the Mac platform superior with the exception of this one keyboard issue. Now my happiness is complete. You have made my day!!!!
February 27th, 2008 at 12:53 am
[...] a great little app called Keyfixer, by Jim Mendenhall that easily takes care of this, and a companion to that for Firefox that makes [...]
March 8th, 2008 at 3:03 pm
KeyFixer works great on Pages in OS 10.5.2.
Thank you very much ! !
March 11th, 2008 at 10:25 am
[...] KeyFixer - Fix Your OS X Home and End Keys Mar.11, 2008 in Mac 源自 Mobile01 的我愛吃蘋果討論區的一篇文章:「請問有很多大大會用MAC寫程式嗎?」,爬到「KeyFixer - Fix Your OS X Home and End Keys」這篇文章。收起來!! Tags: Mac [...]
March 24th, 2008 at 9:25 am
Thank you! Thank you! Thank you! I just switched from this other OS to the one and only and I loved everything but the keyboard layout. This is a great time saver!!!
March 25th, 2008 at 3:34 am
Thank you very much, it’s working now great…. Really, it was such an annoying issue.
April 6th, 2008 at 7:18 pm
Thanks a ton. This has been a bug bear of mine since I moved to the mac OS in Jan 2008. Just brilliant.
April 23rd, 2008 at 7:18 am
Thanks, lovely.
This has totally bugged me since getting a full size keyboard for my Mac.
Another windows -> mac user now happier. But must say still lovin my mac.
April 25th, 2008 at 3:58 am
With Firefox 2.0.0.14, this patch no longer seems to work. Has anyone else had this problem?
May 8th, 2008 at 6:32 pm
This is good info.. much appreciated. Another item I am trying to find is how to modify the word boundaries for text selection.. in iTerm, I can specify what characters make up words I want to click on to select. for example, if I have /dev/nst0 and click on that string “/dev/nst0″ in Terminal, it only selects “dev” or “nst0″, I need it to select “/dev/nst0″ so I can copy/paste. Any ideas on this for macs Terminal.app?