Similar issues in 10.6.4!!
Several times a month, after running for a few hours (4+ hours is the usual timeframe, it seems), my keyboard will slowly stop responding. I figured it was a combination of Synergy (running across two macs), Apptivate, and maybe other apps that used system-wide keyboard shortcuts. It always seems to start with the command key when switching Spaces (letting go of the key doesn't close the spaces overlay). Unfortunately, within 10 minutes, it often devolves into more keys not responding, to the point where I can no longer type into the terminal at all!
Today I just couldn't take "have you tried rebooting?" as the answer anymore, and determined to find the root cause...thanks to this thread, I finally know!!!
If you're not comfortable with Terminal, or like me, have no access to the keyboard at all, here's what I did:
Double click on the hard drive, navigate to Applications > Utilities > Activity Monitor, then sort by name to find the Dock process. Click the quit icon (red octagon), choose "quit" and poof! The dock disappears, and the keyboard works again. The dock will automatically restart, and all should run well (for awhile, at least).
I've had this issue on previous computers as well, and with previous versions of the OS; looks like it's a chronic issue in OSX. Any idea if it's officially recognised by Apple?