Switching Spaces cause Dock to block keyboard events from the frontmost app

Number:rdar://8622464 Date Originated:11/2/2010
Status:Open Resolved:
Product:Mac OS X Product Version:10.6.4
Classification:Crash/Hang/Data Loss Reproducible:Rarely
When switching between Spaces, occasionally the Dock.app can get into a state where it will prevent keyboard events from being delivered to the frontmost application.

Steps to Reproduce:

Switch Spaces.

Expected Results:

The Spaces switching animation moves between spaces, the Spaces HUD fades, and keyboard events work in the new frontmost application.

Actual Results:

The Spaces switching animation moves between spaces, the Spaces HUD remains on screen, and keyboard events do not work in the new frontmost application.


While I cannot reliably reproduce this, there are some symptoms which I believe might be related.

- I generally use the keyboard shortcuts that involve the arrow keys (in Sys Prefs > Expose & Spaces > Spaces > "To switch between spaces"). I use the Control modifier key to invoke this.
- This is not reliable, but I have noticed the problem seems to occur more frequently when I attempt to press a Command key combination while the Spaces animation is switching. I generally notice this when switching to a Space with a Twitter client on, which I quickly press the key combinations Command-R, Command-1, and Command-2.
- The only way to restore keyboard access is to kill the Dock process (which launchd will then relaunch). This fix is not guaranteed, however, and sometimes I can only get one Spaces switch before the Dock hang issue reoccurs. Sometimes it happens, sometimes it doesn't.
- All keyboard events that relate to switching spaces continue to work normally when in this state.


This happens to me daily on 2 separate machines (and has happened on 2 other machines), running both Mac OS X 10.5 and 10.6 variants. If there is *anything* I can do to aid in debugging (e.g. set a user defaults key or install a custom Dock.app build with extensive logging), please let me know.

I suspect the issue is related to the switching animation itself. A user defaults flag to disable that animation would likely mask the issue (as well as speed up my workflow). :)

When I saw the issue reported in rdar://8570845, this bug happened immediately prior to being affected by rdar://8570845.


Disabling the workspace transition animation

I'm not sure if this helps, because I've never seen this problem occur on my machine — but as of Mac OS X 10.6.5, it's possible to disable the "swoosh" animation when changing spaces:

  1. Open /Applications/Utilities/Terminal.app
  2. Copy and paste the following into the terminal window and then press enter: defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES && killall Dock
By tonyarnold at Feb. 26, 2011, 1:22 a.m. (reply...)

Partial solutions

I've found two partial fixes for this.

First, on my MacBook, closing and opening the lid to suspend/unsuspend breaks out of this state. The Sleep command may do the same thing.

Second, the free version of the application Hyperspaces can be set to basically duplicate the basic Spaces functionality. If you just disable the Spaces hotkeys and set them up in Hyperspaces instead, the problem is avoided.

Still waiting for a complete fix.

By RobertHolland0 at Feb. 15, 2011, 1:39 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!