Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: user-defined functions in KeyEventTranslations.tr

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112276] Re: user-defined functions in KeyEventTranslations.tr
  • From: magma <maderri2 at gmail.com>
  • Date: Tue, 7 Sep 2010 06:07:40 -0400 (EDT)
  • References: <i64kdr$37g$1@smc.vnet.net>

John,
it is not clear to me what is the practical difference between your
suggested method and the one mentioned by AlexG.
That is: what difference/advantage does it make to use KernelExecute
instead of FrontEndExecute?
And what is the purpose of MenuEvaluator->Automatic ?


On Sep 7, 8:00 am, John Fultz <jfu... at wolfram.com> wrote:
> On Sun, 5 Sep 2010 05:27:28 -0400 (EDT), AlexG wrote:
> > Mathematica would be about 200% more useful if I could call my own
> > functions from KeyEventTranslations.tr. Does anybody know a way of
> > accomplishing this? On this board, examples of item entries in the
> > file take this form:
> > Item[KeyEvent["...", Modifiers -> {...}], FrontEndExecute[...]
>
> > Is there any way to communicate with the Kernel through
> > FrontEndExecute[] here?
>
> > Thanks, All
>
> You can make this work by wrapping the thing you wish to evaluate in
> KernelExecute, and by adding the option MenuEvaluator->Automatic to the I=
tem[]
> listing.  E.g.,
>
>         Item[KeyEvent["F8"], KernelExecute[Print["F8 was pressed"=
]],
> MenuEvaluator->Automatic]
>
> Sincerely,
>
> John Fultz
> jfu... at wolfram.com
> User Interface Group
> Wolfram Research, Inc.



  • Prev by Date: Re: Finite Groups...infinite disappoinment
  • Next by Date: Re: Sorting a list of names
  • Previous by thread: Re: user-defined functions in KeyEventTranslations.tr
  • Next by thread: Re: user-defined functions in KeyEventTranslations.tr