If you connect a second keyboard to OS X (like me with a Tibook and external keyboard), the Keyboard Viewer (as described in this hint automatically recognizes on which keyboard you type on, and displays the exact layout of this keyboard. After pressing a key on the other one, the Keyboard Viewer menu switches to that one's layout. Even the smaller iMac/1999 keyboard is displayed exactly key by key. Very nicely done, OS X.
[robg adds: Amazingly neat trick -- I tried it with my PowerBook and an old G3/450 translucent keyboard I had lying around. It works as described. As soon as you press a key on either keyboard, the Keyboard Viewer display changes to match the active keyboard's layout.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040424153101149