# Custom setting of HOME and END keys on mac

Is there a way to set the HOME and END keys on a Mac's keyboard to jump the cursor to the line's beginning and end respectively?

I tried to apply a global solution, as suggested for example here, but this didn't help. Is there a way to do it internally in mathematica?

-

The file KeyEventTranslations.tr which can be found in the directory $InstallationDirectory/SystemFiles/FrontEnd/TextResources/Macintosh couples key events to actions in Mathematica. The two lines that define the behaviour of Home and End are Item[KeyEvent["Home"], "ScrollNotebookStart"], Item[KeyEvent["End"], "ScrollNotebookEnd"],  To change the behaviour of these two keys you could replace "ScrollNotebookStart" and "ScrollNotebookEnd" to "MoveLineBeginning" and "MoveLineEnd", respectively. To be on the safe side, you could copy the file to the directory $UserBaseDirectory/SystemFiles/FrontEnd/TextResources/Macintosh first and edit that file instead of the original in $InstallationDirectory. - Do you know where these things are documented? And one remark, under mac, the file is located in another subdirectory named "Macintosh". Thank! – Dror Apr 10 '12 at 9:49 @Dror I've corrected the directory. I don't think these things are documented very well. There is some information about the various files and directories in the installation tree in the entry tutorial/MathematicaFileOrganization in the Documentation Center but that's about it AFAIK. – Heike Apr 10 '12 at 9:59 Putting KeyEventTranslations.tr in $UserBaseDirectory/.../Macintosh wasn't picked up on my system. I'll continue to poke at it and see if I can figure out where I should put it, but in the meantime, if you come up with something, please post an update. –  rcollyer Apr 10 '12 at 15:16