Message Boards Message Boards

Cycle through windows with shortcut in KeyEventTranslations.tr?

Posted 7 years ago

I am trying to add a keyboard shortcut by editing (on a mac) SystemFiles/FrontEnd/TextResources/Macintosh/KeyEventTranslations.tr.

I'd like to have a shortcut to cycle through windows. I've added these two lines to KeyEventTranslations.tr.

Item[KeyEvent["Left", Modifiers -> {Command}],  FrontEndExecute[FrontEndToken["CycleNotebooksBackward"]]], 
Item[KeyEvent["Right", Modifiers -> {Command}],  FrontEndExecute[FrontEndToken["CycleNotebooksForward"]]]

and have commented out the other items which use the "Left" or "Right" keys with the Command Modifier.

It doesn't work (after restarting the FrontEnd). Can anyone see what I am doing incorrectly?

Thanks, WCC

PS: The Items above are the last items in the list which is the argument to KeyEventTranslations in the file.

POSTED BY: W. Craig Carter
Posted 6 years ago

My first question is whether you have some objection to the standard Mac shortcuts Cmd-` and Cmd-~? Those work and don't require hacking KeyEventsTranslation.tr.

I have no specific knowledge of what's going wrong, other than that Cmd-Left/Right as start/end of line is a standard OS X shortcut is perhaps it is being intercepted by the OS.

POSTED BY: Itai Seggev
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract