I want to some key combination like CtrlShift+ to insert Print[ ]; into a workbook. I used

 FrontEndExecute[FrontEndAddMenuCommands[
FrontEndKernelExecute[nb = SelectedNotebook[];
NotebookWrite[nb, Cell[BoxData[RowBox[{"Print[ ];"}]], "Input"]];],
SystemMenuEvaluator -> Automatic]}]]


from this answer. It works nicely, but it adds a new item to the insert menu every time I use it. I've tried as many ways as I can think of to simplify the code, but it never works after these changes. I would rather not use the Esc string Esc approach discussed here Escape because it requires several keystrokes.

• So you want to easily replace functionality for a shortcut? If so, the joker functionality from Shortcuts` package should fit your need. Take a look on example: 34159. Is this what you need? – Kuba Nov 26 '15 at 15:40
• @Kuba - Yes it works. It nice to also have those other shortcuts. Thanks. – George Wolfe Nov 27 '15 at 2:08
• Great :) let's mark it as a duplicate then :) – Kuba Nov 27 '15 at 7:12