Found that it's a common problem that the 'Home' and 'End' keys don't function as-expected on MacOS. Found this fix, posted on LifeHacker:


The issue is that this fix only works on native/Cocoa apps and doesn't work on many of the other apps like ThunderBird and Eclipse. Will be thankful for any help, regarding this.

PS: I frequently switch between the beginning and end of the line and this has been so annoying lately that I switch to a vim window to edit code and use Eclipse only for debugging it.


4 Answers 4


You can do this with Karabiner's 'Use PC Style Home/End #2'.
This remaps Home and End to ⌘← and ⌘→ respectively.


Karabina is now Karabina-Elements. Download it and go to Complex Modifications:

enter image description here

Click Add Rule:

enter image description here

Click Import More Rules from the Internet, and select PC-Style Shortcuts:

enter image description here

Open the link with Karabina-Elements and click Import:

enter image description here

Enable these options (may as well make print screen work):

enter image description here

There is another option to use Ctrl+a and Ctrl+e for the terminal but I already fixed that like this (home/end are the diagonal arrows):

enter image description here

I also added the ctrl/shift-up/down shortcuts in there because for some insane reason Apple doesn't include them by default.


I have the wired keyboard for my iMac. All I have to do is hit the down arrow and it takes me to the end of the line I that my cursor is on. It works exactly like the "end" key on my old windows computers.


Before, I had this working well using Karabiner (if I remember correctly). But after a reinstall of macOS, I couldn't get this working anymore. Even restoring the Karabiner configuration (in ~/.config/karabiner) from a backup didn't work. Too much time spent in trying to configure Karabiner Elements, trying several of the "complex modifications" offered on the site, didn't result in something that worked for most applications.

I finally stumbled upon an alternative key mapping tool in a Karabiner-Elements issue comment. While ⌘英かな is a Japanese application, it is simple enough to set up the required key mappings. Mapping Home/End to Ctrl+Q/E (A/E on my Belgian Azerty keyboard), Home/End key behavior can be fixed for most apps.

key mapping

For some applications, the key mapping doesn't fix things. For these, you should disable the remapping:

exclude applications

For some of these, you can improve Home/End behavior by configuring custom keybindings. Create/edit ~/Library/KeyBindings/DefaultKeyBinding.dict:

    /* Remap Home / End to be correct :-) */
    "\UF729"  = "moveToBeginningOfLine:";                   /* Home         */
    "\UF72B"  = "moveToEndOfLine:";                         /* End          */
    "$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
    "$\UF72B" = "moveToEndOfLineAndModifySelection:";       /* Shift + End  */

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .