Keyboard input goes to previously-active app
Fairly often I'll change focus to a different app by pointing at it and tapping on the trackpad, or command-tabbing to it, the title bar will change to show the app I selected is now active, and I'll start typing...and the typing goes to the previously active app. Say, for example, I'm looking for something in a finder window, then command-tab to firefox, then command-w to close a tab. Instread of the tab closing the finder window closes. Yet, firefox is the active app. It's not a matter of slowness in the interface, either, I can be looking at firefox, see the title bar is active and the traffic lights in the upper left are lit, hit command-w, and something else on my screen disappears. Happens several times per day. I get characters intended for the search field of iTunes instead going to a cell in Excel all the time, or command-h hiding the wrong app, or control-tab doing who knows what rather than changing tabs in firefox, or....
Anyone else? Any idea why I'd have this trouble? This has been happening since about the time I got a magic trackpad in September 2010 (if I recall), but I can't imagine it's a problem with the trackpad since it happens when I change apps with command-tab, too.
Mac Mini, Mac OS X (10.6.4)