I am using MBP with external monitor, in addition to the build-in display. It happens quite often that I 'mentally' switch to other monitor, but the active application is still on different one, where I don't look. Then I start typing, or press some shortcut which leads to unwanted behaviour (e.g. I close an editor tab instead of tab in the chrome).
I was wondering is there is any app, which would use camera to guess where the user is looking and switch the active app accordingly. I am sure that it would not be perfect, but I would give it a try.
Any other suggestions to deal with my problem are also welcome.