I use a Mac Mini with a KVM switch (to share display, keyboard and mouse between it and my PC). My keyboard and mouse combo is the Logitech MX 900 for Bluetooth kit, although this tip may well apply to others also. Under Tiger, I found that every time I switched between machines on my KVM, the Keyboard Setup Assistant would run, asking me to press the key directly to the right of the left-hand Shift key. When this first happened, I thought it was a great way for OS X to tell whether I has a US, International or Japanese keyboard. However, having it appear every time I used the KVM (and even sometimes when simply waking from sleep!) was becoming a real annoyance.
I found that renaming the KeyboardSetupAssistant application prevented it from starting when I switched back to the Mac. NOTE: For convenience, make sure your keyboard is working how it should be before continuing. In my experience so far, OS X remembers the last setting (mine is ISO) even if KeyboardSetupAssistant is disabled. To disable the Keyboard Setup Assistant:
Open a Terminal window and type the following commands (the $ is the prompt):
$ cd /System/Library/CoreServices
$ sudo mv KeyboardSetupAssistant.app/ KeyboardSetupAssistant-OFF.app
Enter your password when asked. As with all things UNIX, if it worked, then you'll simply not see an error. The Keyboard Setup Assistant will no longer run when the keyboard is apparently reconnected after switching between machines with a KVM.
You can reverse the change by re-entering the Terminal and typing these commands:
$ cd /System/Library/CoreServices
$ sudo mv KeyboardSetupAssistant-OFF.app/ KeyboardSetupAssistant.app
It's quite likely the reason I'm getting this behaviour isn't entirely due to the KVM switch. As mentioned, my keyboard is Bluetooth wireless. I do not use it with my Mini's built-in Bluetooth -- rather, I use the Logitech-provided base station. This is because it's much easier when sharing via a KVM -- the base unit simply gets switched between machines. Otherwise, I'd have to re-pair the keyboard and mouse to switch between Mac and PC. There's always a brief pause when the keyboard is first used after switching back to a machine via the KVM as devices are detected and the base unit reconnects. I think this is most likely what causes OS X to re-launch the Keyboard Setup Assistant.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050430055638150