I use some custom shortcut keys in KeyEventTranslations.tr
. One is for the Delete All Output
function:
Item[KeyEvent["w", Modifiers -> {Control}],
FrontEnd`FrontEndExecute[FrontEnd`FrontEndToken["DeleteGeneratedCells"]]]
or simply:
Item[KeyEvent["w", Modifiers -> {Control}], "DeleteGeneratedCells"]
This works as expected, putting up the dialog: "Do you really want to delete all the output cells in the notebook?". Is there any way to set up KeyEventTranslations.tr
that when I hit Ctrl+w the dialog is automatically acknowledged and I don't have to hit Enter? The same goes for the Quit kernel
function, that also puts up a dialog.
Item[KeyEvent["w", Modifiers -> {Control}], "DeleteGeneratedCells"]
$\endgroup$FrontEndXxx
functions are not necessary? $\endgroup$something
andFrontEnd`something
. Maybe the only difference is that the latter form does not get evaluated in the kernel, but both of them might be evaluatable in the front end. I haven't dug deep into this. reference.wolfram.com/mathematica/tutorial/… $\endgroup$Item
inKeyEventTranslations.tr
is a FrontEnd token. As far as I know you do need the form you show if you are going to string several of them together, for example. $\endgroup$