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

MathGroup Archive 2011

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122672] Re: {Keydown,"c"} event in graphics
  • From: Armand Tamzarian <mike.honeychurch at gmail.com>
  • Date: Sat, 5 Nov 2011 04:47:49 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j90h73$sn1$1@smc.vnet.net>

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