MathGroup Archive 2011

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

Search the Archive

Re: {Keydown,"c"} event in graphics


On Nov 4, 10:10 pm, nico... at virtualdynamics.fr wrote:
> Does any body knows how to set a key down event for "c" for an event
> handler wrapped around a graphics object ?
>
> The "c" is associated by the front end to the creation of a circle,
> and i need this key and others shortcuts for other tasks.
>
> EventHandler[Graphics[{}], {"KeyDown", "c"} :> ( (* does not work *)
> Beep[])]
>
> Thanks  Nicolas

Coincidentally I asked tech support about this recently. Some lower
case keys are committed for other functionality. This seems to be the
case with lower case "c". Use upper case "C" and then use Shift "c" to
"activate" e.g.

EventHandler[Graphics[{}], {"KeyDown", "C"} :> ( (* does not work
*)Beep[])]

then do Shift C and it will work. Or alternatively

EventHandler[Graphics[{}], {"KeyDown", "x"} :> ( (* does not work
*)Beep[])]

works okay for me.

Mike



  • Prev by Date: Chestnut Shell "Redux"
  • Next by Date: Re: bug in Mathematica?
  • Previous by thread: Re: {Keydown,"c"} event in graphics
  • Next by thread: Re: {Keydown,"c"} event in graphics