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

MathGroup Archive 2013

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

Search the Archive

Re: Dynamically updated CurrentValue: I want to know which key is

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129423] Re: Dynamically updated CurrentValue: I want to know which key is
  • From: awnl <awnl at gmx-topmail.de>
  • Date: Fri, 11 Jan 2013 22:28:45 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <kcntv9$f8j$1@smc.vnet.net>

Hi,

> Is there a way to get information with CurrentValue of about which key is
> being pressed? CurrentValue only seems to have ways to get mouse buttons
> and modifier key events---which seems odd, I feel like that's going halfway
> with the sort of functionality CurrentValue could provide and I figure I
> must be missing something?

I think you are looking for "EventKey":

EventHandler[Graphics@Rectangle[], {
   "KeyDown" :> Print[CurrentValue["EventKey"]]
   }]

hth,

albert



  • Prev by Date: Re: how to read in a modelica file?
  • Next by Date: Re: Mathematica and Lisp
  • Previous by thread: Re: Export with append??
  • Next by thread: Re: Dynamically updated CurrentValue: I want to know which key is