Disable mouse interference in Cmd-Tab overlay?

I often use ⌘ Cmd-Tab with my right hand on the mouse. If the cursor happens to be within overlay, then any accidental mouse movement causes OS X to think that I want to switch to whichever window icon the cursor lands on.

Meanwhile, I am used to Windows' behavior, where the mouse has no effect on ⌘ Cmd-Tab. I don't want to think, pause, check anything, or correct anything when I use ⌘ Cmd-Tab; I press the combo and intend to instantly switch to the previous app. The mouse simply interferes with this.


enter image description here


Is it possible to turn off this "feature"?


You can prevent mouse interaction with Keyboard Maestro's app switcher:

Demo:

Alternatively, you can lock the mouse position whilst the ⌘ key is still held down:

However, this doesn't appear to be possible without third party tools. You can provide feedback to Apple regarding this on the following page:

  • http://www.apple.com/feedback/macosx.html

defining the Problem

What you're talking about is a kind of focus stealing. In OS X it happens in many instances, but always either by how you describe with the pointer stealing focus, an application event stealing focus, or a System event stealing focus. This problem has vexed OS X users for years, and is at odds with the older X windows users that prefer that Focus Follows Mouse. The result of this conflict is that it is far easier to find settings or third-party software that gives Focus Follows Mouse functionality than it is to find settings or software that prevent the pointer or applications from stealing focus.

Others feeling your pain have posted here, here, here, here, a massive thread here, here, here, here, here, here, here, and here, and the list goes on and on and on... and there is hardly a definitive solution.

Personally, I have nearly given my machine the ability to fly when experiencing the focus stealing issue in this way: I am prompted for an administrative password, and right then, someone sends a chat message to me, the chat window steals focus, and inadvertantly and unintentionally, I enter my password in the chat window and hit return, sending my admin password to them. Compared to this, I'm afraid, your complaint pales, and I think you can see why.

In general, focus is determined on a per application basis, and some applications, such as Terminal and X11, which by default do not have Focus Follows Mouse enabled, have hooks to achieve that functionality using the defaults command. These were the inspiration for my suggestions involving the defaults command below. The Application Switcher is actually a part of the Dock.app, and it, apparently does not have this functionality built-in (thank you grgarside for testing).

I'm doing my best to research this, and I believe I have some viable solutions for you.


Zooom/2

Zooom/2 will allow you to set a delay to the focus-follows-mouse functionality of the pointer where ever it does this. This will have the effect of giving you the functionality you're seeking, preventing the pointer from stealing focus with the Application Switcher. Its $19.95 but there is a Free Trial <-- download link


Alternatives

Use a second display? Then move Application Switcher there

As detailed here. If you work with two displays, presumably, your pointer is usually going to be on your primary display. Move the Application Switcher to your secondary display, and your pointer won't interact with it.

Make your Mouse Pointer more visable

Mouseposé from Boinx Software ($4.99 on the Mac App Store) has the ability to change the color of your cursor, making it more visible, thus reducing the chance that you won't notice it is hovering over your Application Switcher. Also, like Zooom/2 mentioned above, it gives the functionality of introducing a delay before implementing Focus Follows Mouse functionality, mitigating the problem of focus stealing.

If you make your pointer larger, there is less of a chance you won't notice that its hovering over the Application Switcher. You can give this a try by adjusting the System Preferences/Accessability Control Panel/Display/Cursor Size Slider :

change pointer size


MondoMouse

Atomic Bird's MondoMouse may be able to

Virtual Desktop Pro

Codetek's Virtual Desktop Pro might do it (for $40), is well regarded by users if not by Apple.

note: these two apps are really for adding the Focus Follows Mouse functionality to the System, which is the opposite of your requst to prevent the pointer from focus stealing with Application Switcher. Also note that neither of these two applications are actively still developed, and Atomic Bird software is free.


Experiment with the defaults command

The way people find those secret hidden defaults settings is, by and large, by experimenting and trial and error. You're not going to hurt anything, or do something that can't be undone by doing so.

Fire up ye olde Terminal.app and give this a try:

 defaults write com.apple.dock FocusFollowsMouse -string false; killall Dock

The Application Switcher (or ⌘ Cmd-Tab ;-) is actually part of Dock.app. I'm not sure what this will do with the behavior of Dock-proper because I can't test it right now (building stuff, so I can't log out right now). I would wager a guess that it doesn't change anything with the Dock-proper, because that is already the behavior with the Dock (you have to click on something in the Dock, or click and hold, already - though it might break Dock-proper mouse-over info, which just tells you the app name).

What this should do is exactly what you want, cause the mouse pointer to ignore the Application Switcher unless you click the mouse button.

You can reverse this behavior by changing false to true in the above command.


grgarside? Thanks for volunteering how about:

  defaults write com.apple.dock FocusFollowsMouse -string NO; killall Dock

or

  defaults write com.apple.dock wm_ffm -bool false; killall Dock

or

  defaults write com.apple.mouse LSUIElement -string 1; sudo killall -HUP WindowServer  #warning, this killall cmd will quit all apps and log you out

note: anything changed with these commands can be removed by deleting the offending .plist file in ~/Library


Interesting

If any are wondering why Focus Follows Mouse is not (usually) the default behavior of the pointer in OS X:

Focus-follows-mouse is not a particularly suitable input method for OS X because its menu bar was designed to be at the top of the screen. When you move the mouse out of your application window to get to the menus, if it crosses any other application's windows on the way, the menu changes. -scottishwildcat@stackoverflow