MathGroup Archive 2008

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

Search the Archive

Re: waiting for pressed key and reading key

  • To: mathgroup at
  • Subject: [mg87606] Re: waiting for pressed key and reading key
  • From: David Reiss <dbreiss at>
  • Date: Mon, 14 Apr 2008 05:44:14 -0400 (EDT)
  • References: <ftsd13$bar$>

Have you tried to use the KeyDown event with EventHandler?

Also you can do things at the full Notebook level using
NotebookEventActions.  And if you want to get even more Draconian
(i.e., creative) you can use FrontEndEventActions.

I haven't had time to experiment with these for you, but give them a

Hope this helps,


On Apr 13, 3:33 am, Adrian Lupascu <Adrian.Lupa... at> wrote:
> Hi everyone,
> I am interested to include in a program a part in which the program
> waits until either of two specific keys are pressed, and once this
> happens waiting is over and the one key (ut of the two) which was
> pressed determines the value of a variable. I basically want to use as a
> mean to read user confirmation.
> I figured out how to do something in this line by using a DynamicModule,
> with an EventHandler that wait for a mouse click. The problem I have
> with that is that I would prefer to use keys and also that
> "MouseClicked" event requires the cursor to be positioned over a certain
> expression.
> Any help is appreciated.
> Thanks,
> Adrian
> --
> =========================
> Adrian Lupascu
> Centre National de la Recherche Scientifique
> Laboratoire Kastler Brossel
> Ecole Normale Sup=E9rieure
> 24 rue Lhomond
> 75231 Paris CEDEX 05
> Tel: +33 144323304
> Fax: +33 144323434
> E-mail: Adrian.Lupa... at

  • Prev by Date: Re: List concatenation speed
  • Next by Date: Re: List concatenation speed
  • Previous by thread: Re: waiting for pressed key and reading key
  • Next by thread: Cannot Factor an expression