Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: InitializationCell -> Toggle shortcut key

  • To: mathgroup at
  • Subject: [mg56833] Re: InitializationCell -> Toggle shortcut key
  • From: "Trevor Baca" <trevorbaca at>
  • Date: Sat, 7 May 2005 04:16:49 -0400 (EDT)
  • References: <d5ctpl$me6$><d5f62j$6hg$>
  • Sender: owner-wri-mathgroup at


actually many of these suggestions will work, including my original
post using, simply,

InitializationCell -> Toggle

the problem was that i was editing in
*mathematica* rather than using a straight out text editor. editing in
vi suddenly made everything ok.

(isn't vi always the answer?)

also, i've come across something really interesting in this experiment.
specifically, these two key event translation items have subtly but
importantly different effects:

        Item[KeyEvent["i", Modifiers -> {Command, Control}],
                        FrontEnd`FrontEndToken[SelectedNotebook[ ],
"InitializationCell", "Toggle"]


        Item[KeyEvent["i", Modifiers -> {Control, Option}],
                        FrontEnd`FrontEndToken[SelectedNotebook[ ],
"InitializationCell", "Toggle"]

notice that the *only* difference is in the choice of modifier keys.

yet if you add these to your file and try them
out, you'll find that the control+option combination works *with your
cursor sitting in the middle of a cell* while the command+control works
*with an entire cell or collection of cells selected*.

actually, the two combinations compliment or complement each other

but how utterly bizarre that the choice of modifier key can change the
effect of the FrontEndToken.


  • Prev by Date: Re: letrec/named let
  • Next by Date: Re: letrec/named let
  • Previous by thread: Re: InitializationCell -> Toggle shortcut key
  • Next by thread: Re: InitializationCell -> Toggle shortcut key