Skip to main content
1 of 2
Kuba
  • 137.7k
  • 13
  • 289
  • 751

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