I'm attempting to create a keyboard shortcut to center the contents of a text cell exactly as clicking "Align Center" accomplishes in the Format Menu. As far as I can tell, there is no frontendtoken for "Align Center". This surprised me.
The problem seems to be that I can’t find a way to grab the entire cell while retaining the current cursor position. Of course I can create code that will select the current cell and then I change text centering option to center, but then I lose the current cursor position.
The menu item, “align center” can do it so it seems like there must be way I can do it programmatically but can’t figure it out.
Any help?
MenuItem["Align Center", TextAlignment -> Center, Scope -> SelectionCell, MenuKey["c", Modifiers -> {"Command", "Option"}]]
? $\endgroup$