how can I bind "Control"+"Return" to "Evaluate Notebook"


I tried by modifying KeyEventTranslations.tr and restarting my computer. To no avail :(

 (* Evaluation *)
Item[KeyEvent["Enter"], "EvaluateCells"], 
Item[KeyEvent["KeypadEnter"], "EvaluateCells"], 
Item[KeyEvent["Return", Modifiers -> {Shift}], "HandleShiftReturn"],
Item[KeyEvent["KP_Enter"], "EvaluateCells"], 
Item[KeyEvent["KeypadEnter", Modifiers -> {Shift}], "EvaluateNextCell"],    
Item[KeyEvent["KP_Enter", Modifiers -> {Shift}], "EvaluateNextCell"],   
Item[KeyEvent["Enter", Modifiers -> {Shift}], "EvaluateNextCell"], 

Item[KeyEvent["Return", Modifiers -> {Control}], Evaluate[All]],

Item[KeyEvent["Return", Modifiers -> {Option}], "SimilarCellBelow"], 
Item[KeyEvent[".", Modifiers->{Command, Option}], FrontEnd`EvaluatorInterrupt[Automatic]], 
Item[KeyEvent["Escape"], "ShortNameDelimiter"], 


I also tried adding a shortcut for the menu command "Evaluate Notebook" using OS X

System Preference > Keyboard > Shortcuts > App Shortcuts

enter image description here

I notice that other keyboard shortcuts work for this command. But CTRL + RETURN seems to be bound to something else!

  • 1
    $\begingroup$ There does seem to be something special about that shortcut - I can easily bind, for example, <kbd>Shift</kbd>-<kbd>Cmd</kbd>-<kbd>Space</kbd> to "Evaluate Notebook" using the second method $\endgroup$ – Jason B. Jul 11 '17 at 15:32
  • 2
    $\begingroup$ KeyEventTranslations.tr already has a binding for Ctrl+Return. Also, MenuSetup.tr has a binding for Ctrl+Return. I think you need to remove both of these first. $\endgroup$ – Carl Woll Jul 11 '17 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.