Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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 smc.vnet.net
  • Subject: [mg56833] Re: InitializationCell -> Toggle shortcut key
  • From: "Trevor Baca" <trevorbaca at gmail.com>
  • Date: Sat, 7 May 2005 04:16:49 -0400 (EDT)
  • References: <d5ctpl$me6$1@smc.vnet.net><d5f62j$6hg$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

aha.

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

InitializationCell -> Toggle

the problem was that i was editing KeyEventTranslations.tr 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}],
                FrontEndExecute[{
                        FrontEnd`FrontEndToken[SelectedNotebook[ ],
"InitializationCell", "Toggle"]
                }]
        ]


and


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

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

yet if you add these to your KeyEventTranslations.tr 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
perfectly.

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

trevor.


  • 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