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

Fix cycle windows bug on non-US keyboards System
Apparently, the Cycle Windows shortcut for Cocoa applications is broken for some non-US keyboard layouts in Mac OS X 10.1. This is a known bug, but wasn't fixed in the Jaguar preview shown at WWDC earlier this year. It may or may not be fixed in the final release. Luckily, it's quite easy to fix this for your favourite application if you have the developer tools installed (I wish I had tried earlier!).

Read the rest of the article for the how-to...

The method to handle window cycling in Cocoa applications is a private method of NSApplication called _cycleWindows:. To enable its functionality, locate the .nib file containing the main menu of the application you want to modify - it's usually located in /Applications -> SomeApplication -> Contents -> Resources -> English.lproj (assuming you want to fix the English version). It might be named MainMenu.nib if you're lucky, or otherwise if not (you could try MailViewer.nib for Mail and OmniWeb.nib for OmniWeb). I recommend Terminal to navigate there, because in this special case, it's actually the most convenient.

Don't forget to backup the nib file, then double-click it to open it with InterfaceBuilder. If it won't open, that's probably because the info.nib and classes.nib files in MainMenu.nib/ have been removed. Just find an info.nib and classes.nib file in some other application, copy them to MainMenu.nib/ and remove them after you're done. Strange, but it usually works!. Create a new menu item in the Window menu. I usually call it Cycle Windows and assign the keyboard shortcut Command-^, because I'm using a German keyboard. It's probably best to chose the key left to the "1" key, since that's how it's supposed to work anyway.

Now, select the First Responder icon in the Instances tab and switch to the Classes tab. Command-I should bring up the inspector window for the FirstResponder class, and Command-1 will show its Attributes. Select the Actions tab, and create an action named _cycleWindows: if it doesn't already exist. Select the Instances tab and Control-drag from your newly created menu item to the First Responder icon. This will show the Connections for your menu item. With target highlighted on the left side, chose _cycleWindows: on the right hand side and click the Connect button. That's it. Save the nib and open the application you manipulated. If all went well, you'll discover your new menu item in the Window menu, and cycling windows finally works the way it should!

Disclaimer: You should probably not do this at all. If you do, I will not take any responsibility.
  • Currently 3.75 / 5
  You rated: 4 / 5 (4 votes cast)

Fix cycle windows bug on non-US keyboards | 8 comments | Create New Account
Click here to return to the 'Fix cycle windows bug on non-US keyboards' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
a finder solution?
Authored by: dm2243 on Aug 13, '02 11:34:54AM

I wonder if this strategy could be used to implement a cycle windows feature in the finder...

[ Reply to This | # ]
a finder solution?
Authored by: maceuph on Aug 13, '02 01:49:44PM

Nope sorry, the Finder is a Carbon app and this trick only works with Cocoa apps. If I remember correctly, cycling windows actually works in the Finder for 10.2.

[ Reply to This | # ]
a finder solution?
Authored by: acct_removed on Aug 14, '02 07:05:35AM

It does.

[ Reply to This | # ]
Is this fixed in jaguar?
Authored by: egilDOTnet on Aug 13, '02 07:00:48PM

Does window switching for cocoa apps work in jaguar with localized keyboards? Or is this bug still there?

[ Reply to This | # ]
Is this fixed in jaguar?
Authored by: sapporo on Aug 14, '02 07:25:23AM

I was told by Apple that it would definitely work in 10.2, but when I got my hands on a system running the WWDC preview, it did not..

[ Reply to This | # ]
Is this fixed in jaguar?
Authored by: tmk on Aug 16, '02 04:50:15AM

I can confirm that it's fixed on Jaguar (6C115) (at least for the French and Belgian keyboards I'm using). It's a HUGE productivity gain :-).

Btw, I've notice that Apple has rationalized the keyboard shortcuts throughout the system (e.g. in the Finder, all the command under the Go menu now use SHIFT+CMD instead of ALT+CMD as used in 10.1

= tmk =

[ Reply to This | # ]
Is this fixed in jaguar?
Authored by: bluehz on Aug 18, '02 03:41:56PM

Working in 6C115:

cmd+tilde - cycle finder windows forward
cmd+shift+tilde - cycle windows backward

[ Reply to This | # ]
what about for Japanese?
Authored by: mao on Sep 02, '02 10:14:23AM

i'm using a japanese keyboard/os, and the cmd+ tilde only works with IE!
and i just switched to OmniWeb...

is there a way to cycle my windows (preferably through all applications)
without having to touch the terminal?

i'd appreciate your help!

[ Reply to This | # ]