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

MathGroup Archive 2007

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

Search the Archive

Re: EventHandler question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82518] Re: EventHandler question
  • From: "Mariusz Jankowski" <mjankowski at usm.maine.edu>
  • Date: Tue, 23 Oct 2007 05:31:59 -0400 (EDT)
  • Organization: University of Southern Maine
  • References: <ff4hti$k2d$1@smc.vnet.net>

David, not quite sure if this is the correct answer to your question, but
when combining mouse and key events I did:

EventHandler[ ....
   {"MouseClicked" :> If[CurrentValue["AltKey"], ..., ...]}]


So, I am assuming the following should work: replace "MouseClicked" with
"KeyDown" and use If construct to test the current value of multiple keys.


Mariusz










>>> On 10/17/2007 at 4:42 AM, in message <ff4hti$k2d$1 at smc.vnet.net>, David
Reiss<dbreiss at gmail.com> wrote:

> For Eventhandler one can specify a keyboard key that initiates the
> action
> 
> Eventhandler[Blahblahblah,  {"KeyDown","x"}:>something]
> 
> Typically the "x" must be a single keyboard character or perhaps one
> that has an escaped representation (like \t for tab).
> 
> How do I specify a combination such as control-\ ?  (i.e., a two-key
> combination with a modifier key such as control, alt, command, or
> such.)
> 
> When a two-key combination creates a single on-screen character then
> this works fine.  But when there is no on-screen representation then I
> do not know how to do this...
> 
> THanks for any help...
> 
> --David


  • Prev by Date: Re: why no result & no error from this recursion
  • Next by Date: Re: Problem with Integral in mathematica 5.1
  • Previous by thread: EventHandler question
  • Next by thread: Re: EventHandler question