A number of people are having a problem in Snow Leopard where, upon switching Spaces, their keyboards stop functioning in other applications. The system does not freeze, and other input devices, such as mice, still work; however, the keyboard is unusable and the spaces selection indicator stays on top of other windows.
This problem seems to happen only when people use keyboard shortcuts to select a specific Space, rather than when activating the Spaces grid view. The Spaces indicator will activate and then seem to remain as the foremost process, not quitting or allowing other applications to use the keyboard.
Spaces is integrated into the Dock; therefore, if this problem occurs, you can regain control of your keyboard by force-quitting the Dock. Since the mouse should be working, you can navigate to the Utilities folder and open "Activity Monitor." From here, highlight the Dock process and click the "Quit" button, which should make the dock disappear and reappear, releasing the hold on the keyboard.
Force quitting the Dock is a quick workaround, but does not solve the problem, and while there are no known fixes for this issue, it is likely because of a faulty preferences file. Since the Dock is involved in this problem, you might try removing its preference files, which are "com.apple.Dock.plist" and "com.apple.Dock.db," located in the /username/Library/Preferences/ folder.
Additionally, check the keyboard system preferences to see if there are any conflicts with the keyboard shortcuts used for activating Spaces. While unlikely, it is possible a duplicate entry used for both switching Spaces and another function could cause Spaces to hang and not release control.