Rebinding keys to define new keyboard shortcuts
Since you want this functionality to be able to insert aliases using the EscshortcutEsc syntax, you can edit the KeyEventsTranslation.tr
file to achieve this. Copy the following file:
$InstallationDirectory/SystemFiles/FrontEnd/TextResources/Macintosh/KeyEventTranslations.tr
or its equivalent on your system to $UserBaseDirectory/
(with the same directory tree) and add the following modifications after EventTranslations[{
in the file:
Item[KeyEvent["f", Modifiers -> {Control}],
FrontEndExecute[{
FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
"\[AliasDelimiter]", After]
}]],