Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Fix Focus on Menu lock up after switching Spaces System
There is a bug that locks up the Focus on Menu shortcut if you switch Spaces.

When any application is in focus on one Space and you switch to another Space that has no focused application, it defaults to the application from the previous Space but has no windows or focus. (This happens only when using Control+numbers or arrows. It doesn't happen if you reveal all Spaces and choose one.) The System Preferences » Keyboard » Keyboard Shortcuts » Move focus to the menu bar shortcut locks up.

I believe there are other causes, but this one is consistent. Actually, no keyboard shortcuts respond in a new Space with no open window in that app, but Focus on Menu is the only one that stays locked up even when switching back to other Spaces. Worse, it locks up in all Spaces, all applications.

Just knowing the cause helps avoid it; never switch to a Space with no active apps. Also, if you do switch to a blank Space, you immediately switch back to the original Space and engag the shortcut.

If you continue on to another Space, all applications lock up.

To fix this you have to return to the original Space and application where the glitch occurred and engage the 'Focus on Menu' shortcut. It comes back for that application and all other programs.

Having a dozen applications open, as I always do, presents a problem. So I wrote the following script. Interesting note: Command+Tab switches between the two most recent applications. That wouldn't work in this script. Shift+Command+Tab does not: it rotates through all open applications. This discovery allowed me to write a script that moves through all of the applications. Note that key code 122 is F1, which is what I use for Focus on Menu. If you used a different keystroke you'd need to replace it with the corresponding key code.

Here's the AppleScript:
tell application "System Events" to get name of every process whose visible is true
set allApps to result

repeat count of allApps times
	tell application "System Events"
		keystroke tab using {shift down, command down}
		delay 1
		key code 122
		delay 1
		key code 122
	end tell
end repeat

[crarko adds: I haven't tested this one.]
  • Currently 3.14 / 5
  You rated: 1 / 5 (7 votes cast)

Fix Focus on Menu lock up after switching Spaces | 2 comments | Create New Account
Click here to return to the 'Fix Focus on Menu lock up after switching Spaces' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fix Focus on Menu lock up after switching Spaces
Authored by: arcticmac on Jan 28, '11 08:39:25AM

can't seem to replicate that behavior here. Some notes about my setup:
* "auto switch" spaces is turned off.
* use cmd-fkey to switch spaces
* use ctrl-f2 to focus menubar

I wonder if you might be having trouble because the default thing that ctrl-f1 does is to toggle the other ctrl-fn shortcuts for the menubar, the dock, etc. This used to be explicit someplace in system prefs, but I couldn't find it this morning. In any case it seems like it could cause some odd issues.

[ Reply to This | # ]
Fix Focus on Menu lock up after switching Spaces
Authored by: jporten on Feb 05, '11 01:15:40PM

Haven't tested the fix, but I'll share my own for when Spaces locks up: choose Login Window from the Fast User Switching menu, then log in again. Annoying, but it always solves this problem.

[ Reply to This | # ]