keyCode and charCode on foreign keyboards?

I thought all keyboards were alike other than maybe special Chinese and Japanese ones. I was guessing that, other than adding a few extra letters (such as Sweden’s Å, Ä, and Ö), the keyboards would be identical… WRONG.

I find it extremely annoying typing since when I reach for a ", I get an Ä, when I want a closed curly bracket, I get ^. Swedish keyboards are not a programmer’s best friend. It is quite frustrating, but that is another subject, and quite off topic.

No doubt, since the key locations vary so drastically in some areas,

[]How are “keyCode” and “charCode” values different if captured from other keyboards?
]How smart is Flash, and how much does the developer need to compensate for this?
[*]Is there any way to detect what type of keyboard the user is currently using?

For some comparison and reference, I found a site that contains a few keyboard layouts:
United States
Other (list) - site seems a little cheap, but I like the keyboard images.