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?
Answer
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
.
Comments
Post a Comment