Edit
Ah, found it. If you go into a documentation notebook and evaluate:
CurrentValue[InputNotebook[], {StyleDefinitions, "Key1", TemplateBoxOptions}]
you get the display function for the "Key1"
TemplateBox
. You can copy-paste that to a normal notebook and assign it to a variable. You can then use these options in the TemplateBox
expression from earlier:
DisplayFunction -> (FrameBox[
TagBox[GridBox[{{ItemBox[
TemplateBox[{"\[ThickSpace]", #1, "\[ThickSpace]"},
"RowDefault"],
Background -> GrayLevel[0.9333333333333333],
StripOnInput -> False],
ItemBox[TemplateBox[{"\[ThickSpace]", #2, "\[ThickSpace]"},
"RowDefault"], Background -> GrayLevel[1],
StripOnInput -> False]}},
GridBoxAlignment -> {"Columns" -> {{Center}},
"Rows" -> {{Baseline}}}, AutoDelete -> False,
GridBoxDividers -> {"ColumnsIndexed" -> {2 -> GrayLevel[
0.8352941176470589]}, "Rows" -> {{None}}},
GridBoxItemSize -> {"Columns" -> {{All}},
"Rows" -> {{1.45`}}},
GridBoxSpacings -> {"Columns" -> {{0}}},
BaselinePosition -> {{1, 1}, Baseline}], "Grid"],
RoundingRadius -> 4,
Background -> GrayLevel[0.9333333333333333],
FrameMargins -> {{0, 0}, {-1, -1}},
FrameStyle -> {GrayLevel[0.8352941176470589],
AbsoluteThickness[1]}, BaselinePosition -> Baseline,
StripOnInput -> False] &), InterpretationFunction -> Automatic,
CopyFunction -> Automatic, EditingHighlightStyle -> {},
DefaultEditingHighlightStyle -> {},
EditingHighlightArgumentStyle -> {},
DefaultEditingHighlightArgumentStyle -> {},
EditingHighlightBackgroundMargins -> Automatic,
EditingHighlightArgumentBackgroundMargins -> Automatic,
Editable -> Automatic, Selectable -> Automatic,
SyntaxForm -> Automatic, StripWrapperBoxes -> False,
Inactive -> False, InactiveStyle -> "InactiveStyle",
Tooltip -> None, TooltipStyle -> {},
DefaultTooltipStyle -> "TooltipLabel", TooltipDelay -> 0.`};
TemplateBox[{"ctrl", "/"},
"Key1",
BaseStyle -> {"ExampleText", FontWeight -> "Plain",
FontFamily -> "Source Sans Pro"},
boxOpts
] // RawBoxes
You should now be able to put different things in the first argument of the template box to get different shortcuts. You can copy-paste the output to put it where you need it.