Group Abstract Group Abstract

Message Boards Message Boards

Keyboard shortcut for "Evaluate Notebook"

Posted 8 years ago
POSTED BY: Andrew Watters
5 Replies
POSTED BY: Andrew Watters

Or perhaps a keyboard shortcut to restart the kernel and then run the entire notebook as a single operation would be a useful time-saving feature?

POSTED BY: Ian Williams

Note: do not copy and paste the above inserts into your MenuSetup.tr file or Mathematica will give you an error message on launch. This is because the quotes around the "F8" or "E" must be straight quotes, not curly quotes. I don't know why they showed up as curly quotes in this post, but I realized the error when I copied and pasted from my post after installing 11.3. Lol.

POSTED BY: Andrew Watters

This works on Mac also. I chose Command-Option-E because F8 is assigned to iTunes play/pause by default. Here is the solution:

Edit /Applications/Mathematica.app/Contents/SystemFiles/FrontEnd/TextResources/Macintosh/MenuSetup.tr

  1. Make a backup of MenuSetup.tr
  2. Open MenuSetup.tr
  3. Search for “Evaluate Notebook”
  4. You’ll find the correct line (there is only one). Add ‘, MenuKey[“E”, Modifiers->{"Command","Option"}]’ after “EvaluateNotebook”
  5. The revised line should read ‘MenuItem["Evaluate Notebook", "EvaluateNotebook", MenuKey["E", Modifiers->{"Command","Option"}]],’
  6. Re-launch Mathematica, and you should see Command-Option-E next to the Evaluate Notebook command. Try it out.
  7. Success!
POSTED BY: Andrew Watters

Probably because it only takes two Ctrl+a and then Shift+Enter.

About your modification, it is good idea to not mess with installation directory but to create correspoding path in $UserBaseDirectory.

p.s. here is a mma.se topic about the same issue: 33197. I find your solution better then using KeyEventTranslations.tr.

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