Mac OS X’s Calculator: Return and Enter keys refuse to work after application has been hidden

Posted by Pierre Igot in: Macintosh
January 31st, 2007 • 9:30 am

This is a problem that I had been experiencing for a while, intermittently, without being able to identify the exact sequence of actions that were causing it.

I am now able to reproduce it reliably on my machine, even in a clean user environment with no third-party products installed.

The sequence of actions required to reproduce it is as follows:

  1. Launch the Calculator application.
  2. Test it to make sure it works normally, by typing a simple operation such as “2 + 2” and then pressing the Return or Enter key to calculate the sum.
  3. Now option-click on the desktop to switch to the Finder and hide the Calculator at the same time.
  4. Then click on the Calculator icon in the Dock to switch back to the application.
  5. Type the same simple “2 + 2” operation and try pressing the Return or Enter key to calculate the sum.

On my system at least this invariably triggers a system beep and the Return and Enter keys refuse to work as expected.

The problem can be solved by switch again to another application without hiding the Calculator application and then switching back to the Calculator. After this, the Return and Enter keys work as expected again. But if you switch away from the Calculator and hide it, when you return to it the keys no longer work.

You can also hide the Calculator by using the “Hide” commands in the application menu rather than option-clicking on the desktop. Regardless of the method you use to hide the Calculator, the Return and Enter keys cease to work properly when you return to the application that has been hidden.

I remember experiencing this problem on my G4 and my G5 as well, so I am quite sure it’s not a hardware-specific problem with the Mac Pro. And it’s a problem that has been there for a long time, so it’s not tied to a specific system version. As far as I can tell, it affects all recent versions of Mac OS X.

It’s probably because the cause (hiding the application) is not obvious that the bug has been allowed to remain in the system for such a long time. Hopefully, now that I’ve reported it with a 100% reproducible scenario (at least as far as I can tell), it will get fixed…

2 Responses to “Mac OS X’s Calculator: Return and Enter keys refuse to work after application has been hidden”

  1. Evan Gross says:

    All I have to do is hide it with comand-h, then click it’s dock icon, and no enter key for me…

    Pull down a menu extra and that will kick it back into gear.

    Calculator bug? AppKit more likely. SystemUIServer maybe. Probably not worth spending a whole lot of time on.

    Still, always file those radars…

  2. Pierre Igot says:

    Thanks for the additional information… I still find it rather strange that an application’s previous visibility has any impact on its ability to receive/process keystrokes.

    What do the two things have to do with each other? Any developer’s insight?

Leave a Reply

Comments are closed.