Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7316 > unrolled thread

Disable Enter Key as Evaluation

Started byScott Colwell <srcolwell@gmail.com>
First post2011-12-17 07:54 +0000
Last post2011-12-19 12:24 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Disable Enter Key as Evaluation Scott Colwell <srcolwell@gmail.com> - 2011-12-17 07:54 +0000
    Re: Disable Enter Key as Evaluation David Bailey <dave@removedbailey.co.uk> - 2011-12-19 12:19 +0000
    Re: Disable Enter Key as Evaluation David Reiss <dbreiss@gmail.com> - 2011-12-19 12:24 +0000

#7316 — Disable Enter Key as Evaluation

FromScott Colwell <srcolwell@gmail.com>
Date2011-12-17 07:54 +0000
SubjectDisable Enter Key as Evaluation
Message-ID<jchhs3$ils$1@smc.vnet.net>
Hello,

I am creating a standalone CDF. I have InputFields in the CDF and I
only want to use buttons to execute the evaluation of the CDF. So, I
want to disable the enter key and the shift-enter key method of
evaluating. Basically I only want the CDF controlled by the buttons.

Is there a way to do that?

Thanks,

Scott

[toc] | [next] | [standalone]


#7342

FromDavid Bailey <dave@removedbailey.co.uk>
Date2011-12-19 12:19 +0000
Message-ID<jcna4d$e5a$1@smc.vnet.net>
In reply to#7316
On 17/12/2011 07:54, Scott Colwell wrote:
> Hello,
>
> I am creating a standalone CDF. I have InputFields in the CDF and I
> only want to use buttons to execute the evaluation of the CDF. So, I
> want to disable the enter key and the shift-enter key method of
> evaluating. Basically I only want the CDF controlled by the buttons.
>
> Is there a way to do that?
>
> Thanks,
>
> Scott
>
One answer is to create cells which can't be evaluated. For example, if 
you execute:

Print[InputField[z]]

You will find you can operate the InputField in the normal way, but you 
can't execute the cell.

There is a file KeyEventTranslations.tr in one of the installation 
directories, which can be altered (though I have not used this in 
earnest). If you decide to go down that route, make sure to take a 
backup of the file first, because if it is like MenuSetup.tr (which I DO 
modify), any error simply stops Mathematica booting.

David Bailey
http://www.dbaileyconsultancy.co.uk


[toc] | [prev] | [next] | [standalone]


#7351

FromDavid Reiss <dbreiss@gmail.com>
Date2011-12-19 12:24 +0000
Message-ID<jcnadv$e8n$1@smc.vnet.net>
In reply to#7316
I'm slightly puzzled. In a CDF the  enter key and the shift-enter key
method of evaluating cells is universally disabled.  The only way to
evaluate something is via a user interface element such as a button,
or through the change of a Dynamic quantity.  Is the question that you
are asking slightly different, since you mention InputFields in
particular?

--David

On Dec 17, 2:54 am, Scott Colwell <srcolw...@gmail.com> wrote:
> Hello,
>
> I am creating a standalone CDF. I have InputFields in the CDF and I
> only want to use buttons to execute the evaluation of the CDF. So, I
> want to disable the enter key and the shift-enter key method of
> evaluating. Basically I only want the CDF controlled by the buttons.
>
> Is there a way to do that?
>
> Thanks,
>
> Scott

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web