Skip to main content
2 of 2
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/

ok, so you need to add this Item.

Item[KeyEvent["t", Modifiers -> {Control}],
  FrontEndExecute[
      FrontEnd`NotebookApply[FrontEnd`InputNotebook[], 
                             RowBox[{"foo", "[", "\[SelectionPlaceholder]", "]"}]];
      FrontEnd`SelectionMove[FrontEnd`InputNotebook[], All, Expression, 2];
      FrontEnd`SelectionEvaluate[FrontEnd`InputNotebook[]]
                 ]
    ]

###Usage

enter image description here

Select what you need

enter image description here

Use Ctrl+t

enter image description here

###Ref:

Here is a tutorial how to add a new shortcut: Automating Esc [[ Esc formatting?

Kuba
  • 137.7k
  • 13
  • 289
  • 751