# Is there any keyboard shortcut to delete the output of a particular cell

Is there any keyboard shortcut key to delete the output of a particular cell in Mathematica.

Suppose if I am in a particular cell, and the cell has some output and If use some keyboard shortcut like Ctrl+d, I should be able to delete the output of that particular cell.

There is too much burden attached to working with KeyEvenTranslations.tr so I rarely use it.

You can try an alternative: DevTools:NotebookActions:

ResourceFunction["GitHubInstall"]["kubapod", "devtools"]
Needs @ "DevTools";

NotebookActionsEnable[];

EditNotebookActions[];

<| "Label" -> "ClearCell"
, "ShortKey" -> "c"
, "Action" :> FrontEndExecute[{
SelectionMove[InputNotebook[],All,CellContents]
, NotebookDelete @ InputNotebook[]
}]
|>

Press Save and Test.

And you are ready to go: Ctrl+, and then c should clear cell contents.

See this. Change

FrontEndSelectionMove[FrontEndSelectedNotebook[], All, Cell]

to

FrontEndSelectionMove[FrontEndSelectedNotebook[], Next, Cell]
• I did not get this, what exactly it does in a code? – acoustics Dec 20 '18 at 4:17
• As mentioned in this answer. The shortcut definition has to be added to the file KeyEventTranslations.tr. Also mentioned in that answer is this link which shows how to modify that file the right way. All the information you need is available in the links I have provided and the code modification in the answer above. Try it and if you are still unable to get it to work, add a comment and I will try to help out. – Rohit Namjoshi Dec 20 '18 at 4:41