# What is the complete list of valid Front End Tokens?

What is the complete list of valid Front End Tokens? Preferably, by version number.

Have any new tokens been introduced since this question was first posted?

• Hehe, +1, I almost asked that the other day, but I had already posted 3 questions. Let's see what comes up – Rojo Mar 4 '12 at 3:43
• Didn't you post a list of these on SO? Alternatively, if my memory is playing tricks, I think I have seen this discussed with reference to a Mathgroup discussion. – Mike Honeychurch Mar 4 '12 at 5:00
• An approach similar to that suggested for CurrentValue, mathematica.stackexchange.com/questions/1379, would probably be a good starting point. Of course in this case you won't want to limit the files to .nbs. – Brett Champion Mar 4 '12 at 5:07
• – Simon Mar 4 '12 at 5:18
• @Simon I am hoping beliarius will make a rare appearance and post that list himself. I am also hoping any corrections or additions that spelunkers like Oleksandr can make, will be made. – Mr.Wizard Mar 4 '12 at 5:50

I got a request to post here the undocumented tokens I already posted in an old answer on SO.

For completion, I merged my list (which is also in the link provided by @Chris) with @Rojo's list. Later, the list was merged with Vladimir's list below and two more tokens were included, so as to have here a repository of all known FE tokens.

Please feel free to update this answer as new tokens are found.

{
"Above",
"AlignBottoms",
"AlignCentersHorizontally",
"AlignCentersVertically",
"AlignLeftSides",
"AlignRightSides",
"AlignTops",
"AllWindowsFront",
"BackgroundDialog",
"Balance",
"Below",
"BringToFront",
"CellContextDialog",
"CellGroup",
"CellLabelsToTags",
"CellMerge",
"CellSplit",
"CellTagsEditDialog",
"CellTagsEmpty",
"CellTagsFind",
"CellUngroup",
"Clear",
"ClearCellOptions",
"ClearNoAutoScroll",
"Close",
"CloseAll",
"CloseMain",
"ColorSelectorDialog",
"ColorsPanel",
"CompleteSelection",
"Copy",
"CopyCell",
"CopySpecial",
"CreateCounterBoxDialog",
"CreateGridBoxDialog",
"CreateInlineCell",
"CreateValueBoxDialog",
"Cut",
"CycleNotebooksBackward",
"CycleNotebooksForward",
"DebuggerAbort",
"DebuggerClearAllBreakpoints",
"DebuggerContinue",
"DebuggerContinueToSelection",
"DebuggerFinish",
"DebuggerResetProfile",
"DebuggerShowProfile",
"DebuggerStep",
"DebuggerStepIn",
"DebuggerStepInBody",
"DebuggerStepOut",
"DebuggerToggleBreakpoint",
"DebuggerToggleWatchpoint",
"DeleteBibAndNotes",
"DeleteBibReference",
"DeleteGeneratedCells",
"DeleteIndent",
"DeleteInvisible",
"DeleteNext",
"DeleteNextExpression",
"DeletePrevious",
"DeletePreviousWord",
"DistributeBottoms",
"DistributeCentersHorizontally",
"DistributeCentersVertically",
"DistributeLeftSides",
"DistributeRightSides",
"DistributeSpaceHorizontally",
"DistributeSpaceVertically",
"DistributeTops",
"DuplicatePreviousInput",
"DuplicatePreviousOutput",
"EditBibNote",
"EditStyleDefinitions",
"EnterSubsession",
"Evaluate",
"EvaluateCells",
"EvaluateInitialization",
"EvaluateNextCell",
"EvaluateNotebook",
"EvaluatorAbort",
"EvaluatorHalt",
"EvaluatorInterrupt",
"EvaluatorQuit",
"EvaluatorStart",
"ExitSubsession",
"ExpandSelection",
"ExpirationDialog",
"ExplainBeepDialog",
"ExplainColoringDialog",
"ExpressionLinewrap",
"FileNameDialog",
"FindDialog",
"FindEvaluatingCell",
"FindNextMatch",
"FindNextMisspelling",
"FindNextWarningColor",
"FindPreviousMatch",
"FinishNesting",
"FixCellHeight",
"FixCellWidth",
"FontColorDialog",
"FontFamilyB",
"FontPanel",
"FontSizeDialog",
"Fraction",
"FrontEndButtonNotebook[]",
"FrontEndEvaluationNotebook[]",
"FrontEndHide",
"FrontEndInputNotebook[]",
"FrontEndMessagesNotebook[]",
"FrontEndPrivatenb",
"FrontEndQuit",
"FrontEndQuitNonInteractive",
"FrontEndToken[FrontEndButtonNotebook[],\"HyperlinkGo\",distance]",
"GenerateImageCaches",
"GenerateNotebook",
"GeneratePalette",
"GraphicsAlign",
"GraphicsBoxOptionsImageSize",
"GraphicsCoordinatesDialog",
"GraphicsOriginalSize",
"GraphicsPlotRangeAll",
"GraphicsPlotRangeAutomatic",
"GraphicsPlotRangeFixed",
"GraphicsRender",
"Group",
"HandleShiftReturn",
"HelpDialog",
"ImageToAutomatic",
"ImageToBinary",
"ImageToBit",
"ImageToBit16",
"ImageToByte",
"ImageToCMYK",
"ImageToggleAlphaChannel",
"ImageToggleInterleaving",
"ImageToGrayscale",
"ImageToHSB",
"ImageToReal",
"ImageToReal32",
"ImageToRGB",
"Import",
"ImportPictures",
"ImportStyleDefinitions",
"Indent",
"InsertBibAndNotes",
"InsertBibNote",
"InsertBibReference",
"InsertClipPlane",
"InsertMatchingBraces",
"InsertMatchingBrackets",
"InsertMatchingParentheses",
"InsertNewGraphic",
"InsertObject",
"InsertRawExpression",
"InsertSoftReturn",
"InsertSplitBreak",
"LicAuthFailureDialog",
"Linebreak",
"MacintoshOpenDeskAccessory",
"MakeSelectionNotSpan",
"MakeSelectionSpan",
"ModifyBoxFormFormatTypes",
"ModifyDefaultFontProperties",
"ModifyEvaluatorNames",
"ModifyFontSubstitutions",
"ModifyRelatedFiles",
"MoveBackward",
"MoveExpressionEnd",
"MoveForward",
"MoveLineBeginning",
"MoveLineEnd",
"MoveNext",
"MoveNextCell",
"MoveNextExpression",
"MoveNextLine",
"MoveNextPlaceHolder",
"MoveNextWord",
"MovePrevious",
"MovePreviousExpression",
"MovePreviousLine",
"MovePreviousPlaceHolder",
"MovePreviousWord",
"MoveToBack",
"MoveToFront",
"New",
"NewCDFNotebook",
"NewColumn",
"NewPackage",
"NewRow",
"NewText",
"NextFunctionTemplate",
"NotebookMail",
"NotebookMailSelection",
"NotebookOneNote",
"NotebookOneNoteSelection",
"NotebookStatisticsDialog",
"NudgeDown",
"NudgeLeft",
"NudgeRight",
"NudgeUp",
"Open",
"OpenCloseGroup",
"OpenSelection",
"OpenSelectionParents",
"OpenURL",
"OptionsDialog",
"Otherscript",
"Paste",
"PasteApply",
"PasteApplyNoAutoScroll",
"PasteSpecial",
"Placeholder",
"PlainFont",
"PreferencesDialog",
"PreviousFunctionTemplate",
"PrintDialog",
"PrintOptionsDialog",
"PrintSelectionDialog",
"PublishToPlayer",
"RebuildBibAndNotes",
"RebuildHelpIndex",
"RecordSoundDialog",
"RefreshDynamicObjects",
"RemoveFromEvaluationQueue",
"Replace",
"ReplaceAll",
"ReplaceFind",
"ReplaceParent",
"ResetDefaultsText",
"ReverseQuote",
"Revert",
"RunColorDialog",
"RunEdgeColorDialog",
"RunFaceColorDialog",
"Save",
"SaveRename",
"SaveRenameSpecial",
"ScrollLineDown",
"ScrollLineUp",
"ScrollNotebookEnd",
"ScrollNotebookStart",
"ScrollPageBottom",
"ScrollPageDown",
"ScrollPageFirst",
"ScrollPageLast",
"ScrollPageNext",
"ScrollPagePrevious",
"ScrollPageTop",
"ScrollPageUp",
"SelectAll",
"SelectGeneratedCells",
"SelectionAnimate",
"SelectionBrace",
"SelectionBracket",
"SelectionCloseAllGroups",
"SelectionCloseUnselectedCells",
"SelectionConvert",
"SelectionConvertB",
"SelectionDisplayAs",
"SelectionDisplayAsB",
"SelectionHelpDialog",
"SelectionOpenAllGroups",
"SelectionParenthesize",
"SelectionSaveSpecial",
"SelectionScroll",
"SelectionSetFind",
"SelectionSpeak",
"SelectionSpeakSummary",
"SelectionUnbracket",
"SelectLineBeginning",
"SelectLineEnd",
"SelectNext",
"SelectNextExpression",
"SelectNextLine",
"SelectNextWord",
"SelectNotebookWindow",
"SelectPrevious",
"SelectPreviousExpression",
"SelectPreviousLine",
"SelectPreviousWord",
"ServerText",
"SetCitationStyle",
"SetDefaultGraphic",
"ShortNameDelimiter",
"SimilarCellBelow",
"SoundPlay",
"SpellCheckerDialog",
"StackWindows",
"Style",
"StyleDefinitionsOther",
"StyleOther",
"Subscript",
"SubsessionEvaluateCells",
"Superscript",
"SystemPrintOptionsDialog",
"Tab",
"TemplateSelection",
"TestEvaluateNotebook",
"TileWindowsTall",
"TileWindowsWide",
"ToggleAlignmentGuides",
"ToggleDebugFlag",
"ToggleDynamicUpdating",
"ToggleGrayBox",
"ToggleOptionListElement",
"ToggleShowExpression",
"ToggleTestingFlag",
"TrustNotebook",
"Undo",
"Ungroup",
"WelcomeDialog",
"WindowMiniaturize",
"XInfoDialog",
"ZoomWindow",
"$CellContextinputnb$$", "CellContextsourceNotebook$$" }  Quoting John Fultz when he gave the list in Jan 2009: The list is comparatively complete, excepting option names (which can also be used as tokens) The MenuList tokens don't do anything. They're just menu placeholders. Here's something interesting you can do with them... DynamicModule[{font}, Row[{PopupMenu[Dynamic[font], FEEvaluate[FEPrivateGetPopupList["MenuListFonts"]]], Spacer[20], Style["The quick brown fox", 20, FontFamily -> Dynamic[font]]}]]  FEEvaluate[FEPrivateGetPopupList[#]]& returns values appropriate for PopupMenu, and several FE interfaces take advantage of this, so it's unlikely to change in the future (although I wouldn't be surprised if such useful functionality makes its way into much simpler a top-level function some day). Edit by Jacob Let's call the list that was here before I made my edit originalList. The list found by Vladimir (vladimirList), contains most of the items in originalList. The items that were in originalList, but not in vladimirList (Complement[originalList, vladimirList]) are the following. {"FrontEndButtonNotebook[]","FrontEndEvaluationNotebook[]", "FrontEndInputNotebook[]","FrontEndMessagesNotebook[]", "FrontEndPrivatenb", "FrontEndToken[FrontEndButtonNotebook[],\"HyperlinkGo\",distance]", "$CellContextinputnb$$","CellContextsourceNotebook$$"}


I am not sure how these items work and they seem to be different from other tokens. Probably reading the quote by John Fultz is a good first step towards understanding them.

The vladimirList contains a lot of tokens that were not present in the original list. So great work by Vladimir. Even if you do not understand/like the "special tokens" that are in Complement[originalList, vladimirList], please realise that vladimirList is not exhaustive anyway, as it also does contain

{"SelectNextExpression", "SelectPreviousExpression"};

• Please tell me if you find the edit appropriate beli – Rojo Jul 22 '12 at 16:05
• @Rojo Of course, thanks! – Dr. belisarius Jul 22 '12 at 16:48
• I am glad that since the time of my comment under the question your appearances have become not so rare. :-) – Mr.Wizard Jul 24 '12 at 1:45
• @OleksandrR. Well, web-life is like that. I gave the relevant info in that answer, so I think nothing is really lost. – Dr. belisarius Mar 24 '13 at 2:12

This method only returns a few of them, hopefully including some undocumented ones. It's not intended to be a complete answer.

fnames = FileNames[
"*.nb" |
"*.tr", {FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}], FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd",
"TextResources"}],
FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd", "SystemResources"}]}, Infinity]; fimps = Import[#, "Text"] & /@ fnames; DeleteDuplicates@ Flatten@StringCases[fimps, Shortest[ "FrontEndToken[" ~~ (i___ /; SameQ @@ (StringCount[i, #] & /@ {"[", "]"})) ~~ "]"]] // StringReplace[#, Whitespace -> ""] & // MakeExpression[#, StandardForm][[1, 1]] & /@ # & // DeleteDuplicates//Sort//Column  gives { {"AlignBottoms"}, {"AlignCentersHorizontally"}, {"AlignCentersVertically"}, {"AlignLeftSides"}, {"AlignRightSides"}, {"AlignTops"}, {"CellTagsFind"}, {"Clear"}, {"ClearCellOptions"}, {"DebuggerAbort"}, {"DebuggerContinue"}, {"DebuggerContinueToSelection"}, {"DebuggerFinish"}, {"DebuggerStep"}, {"DebuggerStepIn"}, {"DebuggerStepInBody"}, {"DebuggerStepOut"}, {"DebuggerToggleBreakpoint"}, {"DistributeBottoms"}, {"DistributeCentersHorizontally"}, {"DistributeCentersVertically"}, {"DistributeLeftSides"}, {"DistributeRightSides"}, {"DistributeSpaceHorizontally"}, {"DistributeSpaceVertically"}, {"DistributeTops"}, {"EvaluatorStart"}, {"FontPanel"}, {"FrontEndQuitNonInteractive"}, {"FrontEndToken[FrontEndButtonNotebook[],\"HyperlinkGo\",distance]\ "}, {"GenerateImageCaches"}, {"GraphicsRender"}, {"Group"}, {"Import"}, {"MoveBackward"}, {"MoveForward"}, {"MoveToBack"}, {"MoveToFront"}, {"Open"}, {"OpenCloseGroup"}, {"OpenHelpLink"}, {"OptionsDialog"}, {"PreferencesDialog"}, {"PrintDialog"}, {"ScrollNotebookEnd"}, {"ScrollNotebookStart"}, {"SelectionSaveSpecial"}, {"SpellCheckerDialog"}, {"Style"}, {"Ungroup"}, {$CellContextinputnb},
{FrontEndPrivatenb},
{FrontEndButtonNotebook[]},
{FrontEndEvaluationNotebook[]},
{FrontEndInputNotebook[]},
{FrontEndMessagesNotebook[]}
}


If it's about stuff that FrontEndExecute can run, then Names["FrontEnd*"] and Names["FE*"] should give a big enough list not to paste in here, let alone Names["FrontEnd**"] and Names["FE**"]

• @AndyRoss I had just posted an answer on a question on CurrentValue with this method suggested by John Futz, so I used it in here, hopefully to catch a few undocumented not easily found in other ways. Anyone: feel free to edit or copy-paste them to a more complete list – Rojo Mar 4 '12 at 13:48
• I took the liberty to merge your list with another one to get a full repo. Hope you don't mind! – Dr. belisarius Jul 22 '12 at 15:23
• @belisarius not only I don't mind but I'm glad you did. It had to be done – Rojo Jul 22 '12 at 15:59

There is a list posted in 2009 from John Fultz on the MathGroup here.

No version information. Rojo's list has some new ones.

Length@RojosList


56

Length@JohnsList


266

Length@Intersection[RojosList, JohnsList]


35

Here is a combined list from belisarius' old answer of undocumented tokens given by John Fultz in Jan 2009, and tokens obtained from Mathematica system files. 80 of these were not listed in earlier answers. The list is obtained using Rojo's idea, but upgraded and corrected.

fnames = FileNames["*.nb" | "*.tr", {
FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}], FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd",
"TextResources"}],
FileNameJoin[{\$InstallationDirectory, "SystemFiles", "FrontEnd",
"SystemResources"}]
}, Infinity];

fimps = Import[#, "Text"] & /@ fnames;

frontend = Flatten@ StringCases[fimps,
Shortest["FrontEndToken[\"" ~~ x__ ~~ "\""] -> x];

Shortest["Item[" ~~ (i___ /; SameQ @@ (StringCount[i, #] & /@ {"[", "]"})) ~~ "]"]];
menutokens = If[(d = StringPosition[#, "\", \""]) != {} && (d = d[[1, 1]]) == StringPosition[#, "\","][[1, 1]],
StringTake[#, {d + 4, StringPosition[#, "\""][[4, 1]] - 1}]] & /@ menuitems;

keyitems = DeleteDuplicates@Flatten@StringCases[fimps,
Shortest["Item[KeyEvent[" ~~ __ ~~ "]," ~~ Whitespace ~~ "\"" ~~ (i___ /; SameQ @@ (StringCount[i, #] & /@ {"[", "]"})) ~~ "\"]"]];
keyitems = Flatten@StringCases[keyitems, "Item[KeyEvent[" ~~ __ ~~ "]," ~~ Whitespace ~~ "\"" ~~ (x___ /; (StringCount[x, "\""] == 0)) ~~ "\"]" -> x];

l = frontend \[Union] menutokens \[Union] keyitems;
l // Sort // Column


The code finally gives more than two hundred tokens. Combined with the old list gives 360 in total:

AboutBoxDialog
Above
AlignBottoms
AlignCentersHorizontally
AlignCentersVertically
AlignLeftSides
AlignRightSides
AlignTops
AllWindowsFront
BackgroundDialog
Balance
Below
BringToFront
CellContextDialog
CellGroup
CellLabelsToTags
CellMerge
CellSplit
CellTagsEditDialog
CellTagsEmpty
CellTagsFind
CellUngroup
Clear
ClearCellOptions
ClearNoAutoScroll
Close
CloseAll
CloseMain
ColorSelectorDialog
ColorsPanel
CompleteSelection
Copy
CopyCell
CopySpecial
CreateCounterBoxDialog
CreateGridBoxDialog
CreateInlineCell
CreateValueBoxDialog
Cut
CycleNotebooksBackward
CycleNotebooksForward
DebuggerAbort
DebuggerClearAllBreakpoints
DebuggerContinue
DebuggerContinueToSelection
DebuggerFinish
DebuggerResetProfile
DebuggerShowProfile
DebuggerStep
DebuggerStepIn
DebuggerStepInBody
DebuggerStepOut
DebuggerToggleBreakpoint
DebuggerToggleWatchpoint
DeleteBibAndNotes
DeleteBibReference
DeleteGeneratedCells
DeleteIndent
DeleteInvisible
DeleteNext
DeleteNextExpression
DeletePrevious
DeletePreviousWord
DistributeBottoms
DistributeCentersHorizontally
DistributeCentersVertically
DistributeLeftSides
DistributeRightSides
DistributeSpaceHorizontally
DistributeSpaceVertically
DistributeTops
DuplicatePreviousInput
DuplicatePreviousOutput
EditBibNote
EditStyleDefinitions
EnterSubsession
Evaluate
EvaluateCells
EvaluateInitialization
EvaluateNextCell
EvaluateNotebook
EvaluatorAbort
EvaluatorHalt
EvaluatorInterrupt
EvaluatorQuit
EvaluatorStart
ExitSubsession
ExpandSelection
ExpirationDialog
ExplainBeepDialog
ExplainColoringDialog
ExpressionLinewrap
FileNameDialog
FindDialog
FindEvaluatingCell
FindNextMatch
FindNextMisspelling
FindNextWarningColor
FindPreviousMatch
FinishNesting
FixCellHeight
FixCellWidth
FontColorDialog
FontFamilyB
FontPanel
FontSizeDialog
Fraction
FrontEndHide
FrontEndQuit
FrontEndQuitNonInteractive
GenerateImageCaches
GenerateNotebook
GeneratePalette
GraphicsAlign
GraphicsBoxOptionsImageSize
GraphicsCoordinatesDialog
GraphicsOriginalSize
GraphicsPlotRangeAll
GraphicsPlotRangeAutomatic
GraphicsPlotRangeFixed
GraphicsRender
Group
HandleShiftReturn
HelpDialog
ImageToAutomatic
ImageToBinary
ImageToBit
ImageToBit16
ImageToByte
ImageToCMYK
ImageToggleAlphaChannel
ImageToggleInterleaving
ImageToGrayscale
ImageToHSB
ImageToReal
ImageToReal32
ImageToRGB
Import
ImportPictures
ImportStyleDefinitions
Indent
InsertBibAndNotes
InsertBibNote
InsertBibReference
InsertClipPlane
InsertMatchingBraces
InsertMatchingBrackets
InsertMatchingParentheses
InsertNewGraphic
InsertObject
InsertRawExpression
InsertSoftReturn
InsertSplitBreak
LicAuthFailureDialog
Linebreak
MacintoshOpenDeskAccessory
MakeSelectionNotSpan
MakeSelectionSpan
ModifyBoxFormFormatTypes
ModifyDefaultFontProperties
ModifyEvaluatorNames
ModifyFontSubstitutions
ModifyRelatedFiles
MoveBackward
MoveExpressionEnd
MoveForward
MoveLineBeginning
MoveLineEnd
MoveNext
MoveNextCell
MoveNextExpression
MoveNextLine
MoveNextPlaceHolder
MoveNextWord
MovePrevious
MovePreviousExpression
MovePreviousLine
MovePreviousPlaceHolder
MovePreviousWord
MoveToBack
MoveToFront
New
NewCDFNotebook
NewColumn
NewPackage
NewRow
NewText
NextFunctionTemplate
NotebookMail
NotebookMailSelection
NotebookOneNote
NotebookOneNoteSelection
NotebookStatisticsDialog
NudgeDown
NudgeLeft
NudgeRight
NudgeUp
Open
OpenCloseGroup
OpenSelection
OpenSelectionParents
OpenURL
OptionsDialog
Otherscript
Paste
PasteApply
PasteApplyNoAutoScroll
PasteSpecial
Placeholder
PlainFont
PreferencesDialog
PreviousFunctionTemplate
PrintDialog
PrintOptionsDialog
PrintSelectionDialog
PublishToPlayer
RebuildBibAndNotes
RebuildHelpIndex
RecordSoundDialog
RefreshDynamicObjects
RemoveFromEvaluationQueue
Replace
ReplaceAll
ReplaceFind
ReplaceParent
ResetDefaultsText
ReverseQuote
Revert
RunColorDialog
RunEdgeColorDialog
RunFaceColorDialog
Save
SaveRename
SaveRenameSpecial
ScrollLineDown
ScrollLineUp
ScrollNotebookEnd
ScrollNotebookStart
ScrollPageBottom
ScrollPageDown
ScrollPageFirst
ScrollPageLast
ScrollPageNext
ScrollPagePrevious
ScrollPageTop
ScrollPageUp
SelectAll
SelectGeneratedCells
SelectionAnimate
SelectionBrace
SelectionBracket
SelectionCloseAllGroups
SelectionCloseUnselectedCells
SelectionConvert
SelectionConvertB
SelectionDisplayAs
SelectionDisplayAsB
SelectionHelpDialog
SelectionOpenAllGroups
SelectionParenthesize
SelectionSaveSpecial
SelectionScroll
SelectionSetFind
SelectionSpeak
SelectionSpeakSummary
SelectionUnbracket
SelectLineBeginning
SelectLineEnd
SelectNext
SelectNextLine
SelectNextWord
SelectNotebookWindow
SelectPrevious
SelectPreviousLine
SelectPreviousWord
ServerText
SetCitationStyle
SetDefaultGraphic
ShortNameDelimiter
SimilarCellBelow
SoundPlay
SpellCheckerDialog
StackWindows
Style
StyleDefinitionsOther
StyleOther
Subscript
SubsessionEvaluateCells
Superscript
SystemPrintOptionsDialog
Tab
TemplateSelection
TestEvaluateNotebook
TileWindowsTall
TileWindowsWide
ToggleAlignmentGuides
ToggleDebugFlag
ToggleDynamicUpdating
ToggleGrayBox
ToggleOptionListElement
ToggleShowExpression
ToggleTestingFlag
TrustNotebook
Undo
Ungroup
WelcomeDialog
WindowMiniaturize
XInfoDialog
ZoomWindow


To make a token use the function FrontEndToken["Name"]

This is not a proper answer. Rather, it provides some tools to handle the lists of tokens in other answers.

Let

jacobList = {"SelectNextExpression", "SelectPreviousExpression"};


I used the code below to merge the lists by belisarius (originalList), Vladimir (vladimirList) and myself (jacobList).

You can set vladimirList = l, where l is defined in Vladimir's answer.

After executing the code, there is a string on the clipboard that is will be a nicely formatted code block on this site.

CopyToClipboard@
StringJoin[
Append[Prepend[
Riffle[ToString[#, InputForm] & /@
",\n    "], "    {\n    "], "\n    }"]]


Text to list (perhaps a bit silly)

Vladimir provides a list in a code block. In order to turn this into a proper List, take the following steps (as an alternative to just evaluating his code).

First, copy the contents of the code block.

Then, execute the following code in one cell

(*Depends on having the right data on the clipboard*)
Cell["", "Text", CellTags -> "vladimir"] // CellPrint
SelectionMove[EvaluationNotebook[], Before, CellContents]
Paste[]
]


I scraped all the possible FrontEndToken[___] and FrontEndTokenExecute[___] data possible (I think) from the notebooks and packages in the installation directory and I have a few things that have clearly been added since the list was last updated. I won't post the entire list I found as most of that stuff is guide references and titles but there are a few fun finds.

First there's the new way to open the find dialog (in the lists provided it is FindDialog but that seems not to work. What does work in 11 in FindExpression.

Also this method provides usage data so I found that you can use the Style token to basically cell print a new cell with that style.

e.g. FrontEndTokenExecute[nb:_NotebookObject:InputNotebook[],"Style",stylename_] to cell print a cell of that style. This is almost certainly how the "Style" menu does its thing.

There's also the Toggle token that toggles settings, like bold text: FrontEndTokenExecute[InputNotebook[], "FontWeight", Toggle] the same thing exists for {"FontWeight", "FontSlant", "FontVariationsUnderline", "FontSize"} it seems.

It can also be used as a general options setter via, for example, FrontEndTokenExecute[InputNotebook[], "CellFrame", {{1, 1}, {1, 1}}] which sets the cell frame. I also found "WholeCellGroupOpener" and "CellFrameColor" although things like "ShowGroupOpener" also work. Basically the front end can set any cell option via a token. Not too surprising, but worth knowing.

What I ended up finding that is, I think, not on any of the previous lists is this:

{"Background", "CellFrame", "CellFrameColor", "ClearCropMarker",
"FindExpression", "FontSize", "FontSlant", "FontVariationsUnderline",
"NotebookSecurity", "OpenCloudObject", "SelectNextCell",
"SelectPreviousCell", "WholeCellGroupOpener", "WolframCloudLogout"}


Most of these are style options/toggle values and the Clear* family seem to throw errors generally (the way they are used is FrontEndTokenExecute[token]).

OpenCloudObject and WolframCloudLogout are both used with FrontEndTokenExecute although the WolframCloudLogout seems to take a second boolean argument (False in whatever source file it came from)

{"GlobalPreferences", "NotebookSecurity"} are just options dialogs (used with "OptionsDialog".

Beware of LicenseAgreementDialog as it just opens a license agreement that quits Mathematica altogether if you close the window. Not useful.

In fact the only real finds here are SelectNextCell and SelectPreviousCell which I think need no explanation.

## UPDATE

Since I have the usage data, why not post it here? Each of these is just a sample usage. For many of these keys there were multiple usage entries. Note that there are tons of tokens missing from this. Almost certainly I just missed some files in scraping or the "HeldExpressions" package element couldn't be imported.

"AlignBottoms"->Hold[FrontEndToken["AlignBottoms"]],
"AlignCentersHorizontally"->Hold[FrontEndToken["AlignCentersHorizontally"]],
"AlignCentersVertically"->Hold[FrontEndToken["AlignCentersVertically"]],
"AlignLeftSides"->Hold[FrontEndToken["AlignLeftSides"]],
"AlignRightSides"->Hold[FrontEndToken["AlignRightSides"]],
"AlignTops"->Hold[FrontEndToken["AlignTops"]],
"BackgroundDialog"->Hold[FrontEndToken[InputNotebook[],"BackgroundDialog"]],
"Balance"->Hold[FrontEndToken[InputNotebook[],"Balance"]],
"CellFrameColor"->Hold[FrontEndToken[InputNotebook[],"CellFrameColor",MEpalettecellFrameColorSelection]],
"CellGroup"->Hold[FrontEndToken[InputNotebook[],"CellGroup"]],
"CellMerge"->Hold[FrontEndToken[InputNotebook[],"CellMerge"]],
"CellSplit"->Hold[FrontEndToken[InputNotebook[],"CellSplit"]],
"CellUngroup"->Hold[FrontEndToken[InputNotebook[],"CellUngroup"]],
"ClearCropMarker"->Hold[FrontEndTokenExecute["ClearCropMarker"]],
"ClearMultiSelMarkers"->Hold[FrontEndTokenExecute["ClearMultiSelMarkers"]],
"ClearPixelPointMarkers"->Hold[FrontEndTokenExecute["ClearPixelPointMarkers"]],
"CloseAll"->Hold[FrontEndTokenExecute["CloseAll",False]],
"CompleteSelection"->Hold[FrontEndToken[InputNotebook[],"CompleteSelection"]],
"CreateInlineCell"->Hold[FrontEndToken[InputNotebook[],"CreateInlineCell"]],
"Cut"->Hold[FrontEndToken["Cut"]],
"DeleteNext"->Hold[FrontEndToken[InputNotebook[],"DeleteNext"]],
"DeletePrevious"->Hold[FrontEndToken[InputNotebook[],"DeletePrevious"]],
"DistributeBottoms"->Hold[FrontEndToken["DistributeBottoms"]],
"DistributeCentersHorizontally"->Hold[FrontEndToken["DistributeCentersHorizontally"]],
"DistributeCentersVertically"->Hold[FrontEndToken["DistributeCentersVertically"]],
"DistributeLeftSides"->Hold[FrontEndToken["DistributeLeftSides"]],
"DistributeRightSides"->Hold[FrontEndToken["DistributeRightSides"]],
"DistributeSpaceHorizontally"->Hold[FrontEndToken["DistributeSpaceHorizontally"]],
"DistributeSpaceVertically"->Hold[FrontEndToken["DistributeSpaceVertically"]],
"DistributeTops"->Hold[FrontEndToken["DistributeTops"]],
"DuplicatePreviousInput"->Hold[FrontEndToken["DuplicatePreviousInput"]],
"DuplicatePreviousOutput"->Hold[FrontEndToken["DuplicatePreviousOutput"]],
"EvaluateCells"->Hold[FrontEndToken[InputNotebook[],"EvaluateCells"]],
"EvaluateNextCell"->Hold[FrontEndToken[InputNotebook[],"EvaluateNextCell"]],
"EvaluatorQuit"->Hold[FrontEndTokenExecute["EvaluatorQuit"]],
"FindExpression"->Hold[FrontEndToken["FindExpression"]],
"FindNextMisspelling"->Hold[FrontEndToken["FindNextMisspelling"]],
"FontColorDialog"->Hold[FrontEndToken[InputNotebook[],"FontColorDialog",Automatic]],
"FontSlant"->Hold[FrontEndToken[InputNotebook[],"FontSlant",Toggle]],
"FontVariationsUnderline"->Hold[FrontEndToken[InputNotebook[],"FontVariationsUnderline",Toggle]],
"FontWeight"->Hold[FrontEndToken[InputNotebook[],"FontWeight",Toggle]],
"Fraction"->Hold[FrontEndToken[InputNotebook[],"Fraction"]],
"FrontEndQuitNonInteractive"->Hold[FrontEndTokenExecute["FrontEndQuitNonInteractive"]],
"GlobalPreferences"->Hold[FrontEndToken["OptionsDialog","","GlobalPreferences"]],
"Group"->Hold[FrontEndToken["Group"]],
"Linebreak"->Hold[FrontEndToken[InputNotebook[],"Linebreak"]],
"MoveBackward"->Hold[FrontEndToken["MoveBackward"]],
"MoveForward"->Hold[FrontEndToken["MoveForward"]],
"MoveLineBeginning"->Hold[FrontEndToken[InputNotebook[],"MoveLineBeginning"]],
"MoveLineEnd"->Hold[FrontEndToken[InputNotebook[],"MoveLineEnd"]],
"MoveNextLine"->Hold[FrontEndToken[FrontEndButtonNotebook[],"MoveNextLine"]],
"MoveNextWord"->Hold[FrontEndToken[InputNotebook[],"MoveNextWord"]],
"MovePreviousWord"->Hold[FrontEndToken[InputNotebook[],"MovePreviousWord"]],
"MoveToBack"->Hold[FrontEndToken["MoveToBack"]],
"MoveToFront"->Hold[FrontEndToken["MoveToFront"]],
"NewColumn"->Hold[FrontEndToken["NewColumn"]],
"NewRow"->Hold[FrontEndToken["NewRow"]],
"NotebookSecurity"->Hold[FrontEndTokenExecute["OptionsDialog","NotebookSecurity"]],
"Open"->Hold[FrontEndTokenExecute["Open"]],
"OpenCloudObject"->Hold[FrontEndTokenExecute["OpenCloudObject"]],
"Paste"->Hold[FrontEndToken["Paste"]],
"PrintDialog"->Hold[FrontEndTokenExecute["PrintDialog"]],
"RebuildHelpIndex"->Hold[FrontEndTokenExecute["RebuildHelpIndex"]],
"ScrollPageFirst"->Hold[FrontEndToken[FrontEndInputNotebook[],"ScrollPageFirst"]],
"ScrollPageLast"->Hold[FrontEndToken[FrontEndInputNotebook[],"ScrollPageLast"]],
"SelectNextCell"->Hold[FrontEndToken[nb,"SelectNextCell"]],
"SelectPrevious"->Hold[FrontEndToken[nb,"SelectPrevious"]],
"SelectPreviousCell"->Hold[FrontEndToken[nbobj,"SelectPreviousCell"]],
"ShortNameDelimiter"->Hold[FrontEndToken[InputNotebook[],"ShortNameDelimiter"]],
"Superscript"->Hold[FrontEndToken[InputNotebook[],"Superscript"]],
"TemplateSelection"->Hold[FrontEndToken[InputNotebook[],"TemplateSelection"]],
"Text"->Hold[FrontEndToken[InputNotebook[],"Style","Text"]],
"Ungroup"->Hold[FrontEndToken["Ungroup"]],
"WholeCellGroupOpener"->Hold[FrontEndToken[InputNotebook[],"WholeCellGroupOpener",!AbsoluteCurrentValue[NotebookSelection[InputNotebook[]],"WholeCellGroupOpener"]]],
"WolframCloudLogout"->Hold[FrontEndTokenExecute["WolframCloudLogout",False]]

• btw, any idea what "Copy as Plain text" does? Because I am trying to use it programmatically but it inserts additional newlines. – Kuba Aug 31 '17 at 6:47
• @Kuba that's the token that's called for Command-Shift-C on a Mac. In my experience it copies directly what the front-end renders rather than anything with boxes or tokens that Mathematica can later interpret. As something informative, make a text cell, type some stuff, copy it, and paste it into a text editor. At least for me every character gets a \ and a newline after it. With copy-as-plain-text this isn't the case. If you can't get the token working you can try a ExportPacket[___, "PlainText"] or FEmakePlainText followed by a CopyToClipboard. – b3m2a1 Aug 31 '17 at 6:52
• That is the problem, methods you've mentioned add \r\n in place of \n while direct menu copy as and paste don't. – Kuba Aug 31 '17 at 6:54
• Sorry the actual MenuSetup token is FrontEndCopySpecial["PlainText"] it seems. But it turns out that isn't a real packet. So I'm guessing they're using an ExportPacket plus a FE-copy. But I don't really know. – b3m2a1 Aug 31 '17 at 6:54
• Ok, thanks, will delete those \r manually :) – Kuba Aug 31 '17 at 6:58