Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Remap Home and End Keys?

I am a new MacOS user with a new iMac. I have been using DOS/Windows computers since the mid 80's and am VERY used to the way HOME and END keys move the cursor. I have done searches and found some programs that allow key mapping but I am always conscious of loading third party software and giving it too much access. Is there a "safe" key mapping option I can use?

iMac Line (2012 and Later)

Posted on Feb 6, 2020 7:16 AM

Reply
Question marked as Best reply

Posted on Feb 14, 2020 9:45 AM

Found the solution... Posting in case it helps any other person coming from Windows or that uses both OS's.


Run this at the command line, perhaps within Terminal or iterm2:


mkdir -p $HOME/Library/KeyBindings
echo '{
/* 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 */
}' > $HOME/Library/KeyBindings/DefaultKeyBinding.dict


Similar questions

5 replies
Question marked as Best reply

Feb 14, 2020 9:45 AM in response to radamo59

Found the solution... Posting in case it helps any other person coming from Windows or that uses both OS's.


Run this at the command line, perhaps within Terminal or iterm2:


mkdir -p $HOME/Library/KeyBindings
echo '{
/* 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 */
}' > $HOME/Library/KeyBindings/DefaultKeyBinding.dict


Feb 6, 2020 7:37 AM in response to radamo59

radamo59 wrote:

I am a new MacOS user with a new iMac. I have been using DOS/Windows computers since the mid 80's and am VERY used to the way HOME and END keys move the cursor. I have done searches and found some programs that allow key mapping but I am always conscious of loading third party software and giving it too much access. Is there a "safe" key mapping option I can use?



See if there is anything here: Mac tips for Windows switchers - Apple Support


Remap Home and End Keys?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.