Mac OS focus on right-click

Is there any way to have Mac OS focus a window that I right-click on? It happens to me quite frequently that I right-click on something, choose "rename" or "create file" or what have you, need to type the filename and the keyboard input goes to another window, because Mac OS appears to switch focus only on a left-click.


Having the same problem as OP, I found a solution today:

BetterTouchTool (45 days of free trial, licenses from $6.50) can assign multiple actions to a gesture.

Image showing gesture config

  1. Depending on your mouse setup, choose a trigger. I use a MagicMouse, so I chose '1 Finger Tap Right'.
  2. Choose 'Activate/Bring to Front Window Under Cursor'
  3. 'Click Add Additional Action'
  4. Choose 'Right Click'

Now BetterTouchTool will first activate the window under cursor, then dispatch a right click to it. Seems to work just fine on the Applications I tested it on.


Try control-clicking. What happens? (Different apps behave differently with this--Finder being a notable exception.)


There is no way to have focus follow right-click across all apps on Mac OS X.