Search Ali's Blog

Thursday, April 03, 2014

[MAC OS] Fix Home/End keys



OS X version: 10.8.x
Issue: If you're used to get to the begining/end of the line by hitting home/end keys, you might already noticed that this is not the way it works on MAC


Fix: Open terminal window:

mkdir -p ~/Library/KeyBindings/
copy and paste the following:
{
/* Remap Home / End keys to be correct */
"\UF729" = "moveToBeginningOfLine:"; /* Home */
"\UF72B" = "moveToEndOfLine:"; /* End */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */
"^\UF729" = "moveToBeginningOfDocument:"; /* Ctrl + Home */
"^\UF72B" = "moveToEndOfDocument:"; /* Ctrl + End */
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; /* Shift + Ctrl + Home */
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:"; /* Shift + Ctrl + End */
}


Save and restart.
Credit goes to:
http://mwholt.blogspot.com/2012/09/fix-home-and-end-keys-on-mac-os-x.html

No comments: