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: [mg56802] Re: InitializationCell -> Toggle shortcut key
  • From: Lee Newman <leenewm at>
  • Date: Fri, 6 May 2005 03:00:27 -0400 (EDT)
  • References: <d5ctpl$me6$>
  • Sender: owner-wri-mathgroup at

Trevor Baca wrote:
> mathgroup,
> i'd like to create a keyboard shortcut to toggle initialization cell
> status.
> reading through the archives and studying a post from paul hinton, i
> edit the file (deeply buried in the filesystem)
> to include the following line:
> Item[KeyEvent["i", Modifiers -> {Command, Control}], InitializationCell
> -> Toggle]
> i save, restart, and blow up. (something about a syntax error on line
> 52 of the file that reads \tItem[KeyEvent[\".)
> my intuition of what's wrong is that i stole the InitializationCell ->
> Toggle bit from in the same directory and that a rule like
> that won't do as the second argument to Item[ ]; my guess is that i'll
> need a three-part FontEndToken[ ] object to pass into the second
> position of Item[ ], but i haven't a clue as to what the correct
> structure for that FrontEndToken[ ] would be.
> anyone have any suggestions on formulating an initialization cell
> toggle Item[ ] for

I have the following code that creates a button that toggles the init 
cell status on/off.  Note: the code below is a snippet from notebook 
that I used to create a palette that includes the Init Cell button in 

             RowBox[{"Toggle", " ",
               RowBox[{"Init", " ", "Cell"}]}],
             ButtonFunction:>FrontEndExecute[ {
                   SelectedNotebook[ ], "InitializationCell", "Toggle"]}],


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