MathGroup Archive 2009

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

Search the Archive

Re: Problem with CurrentValue and Alt key

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104626] Re: [mg104563] Problem with CurrentValue and Alt key
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Thu, 5 Nov 2009 03:49:59 -0500 (EST)
  • Reply-to: jfultz at wolfram.com

On Wed, 4 Nov 2009 01:33:14 -0500 (EST), Harrie Kraai wrote:
> Hi, I got the following example from the Documentation Center on
> CurrentValue, but noticed a quirk: pushing the Alt key is signaled
> correctly only every other time (only the first, third, fifth, etc., the
> second etc. seem to be ignored):
>
>
> Grid[{ToExpression["\[" <> # <> "]"],
> Dynamic[CurrentValue[#]]} & /@ {"AltKey", "CommandKey",
> "ControlKey", "OptionKey", "ShiftKey"}, Frame -> All,
> ItemStyle -> {{Large, Automatic}}]
>
>
> This is both on Linux (SuSE 10.?) and on Windows XP, Mathematica 7.0.1.
> Bug or feature?
>
> HK

Feature of the operating system.

The first press of the Alt key triggers the menus.  This is an accessibility
feature, which allows users without the ability to easily navigate with a mouse 
to use the menus (although some non-disabled users occasionally use it to for 
menus which have no key bindings).

The problem is that, once you're in this mode, then the only thing that's 
listening for key events is the menu handler.  No other keystroke, including
Alt, will be paid heed by your code or anything else except for the menu 
handler.  Pressing Alt again, though, toggles you out of this mode.  Which is 
why you see it succeed precisely once every other keystroke.

Sincerely,
 
John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.




  • Prev by Date: remote kernel trouble
  • Next by Date: Re: Bug with Sequence
  • Previous by thread: Problem with CurrentValue and Alt key
  • Next by thread: Bug with Sequence