# keyCode and charCode on foreign keyboards?

**URL:** <https://forum.kirupa.com/t/keycode-and-charcode-on-foreign-keyboards/295179>\
**Category:** flash\
**Created:** [August 26, 2009, 11:44am UTC](https://forum.kirupa.com/t/keycode-and-charcode-on-foreign-keyboards/295179 "2009-08-26T11:44:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IQAndreas](https://avatars.discourse-cdn.com/v4/letter/i/f08c70/32.png) [@IQAndreas](https://forum.kirupa.com/u/IQAndreas)\
**Post date:** [August 26, 2009, 11:44am UTC](https://forum.kirupa.com/t/keycode-and-charcode-on-foreign-keyboards/295179/1 "2009-08-26T11:44:58Z")

</div>

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,

[LIST=1]  
[_]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?  
[/LIST]

For some comparison and reference, I found a site that contains a few keyboard layouts:  
[United States](http://frontype.com/keyboarding/540px-Computer-keyboard-United-States-NoAltGr.svg.png)  
[Sweden/Finland](http://frontype.com/keyboarding/540px-Computer-keyboard-Sweden.svg.png)  
[Other (list)](http://keyboard-layout.info/) - site seems a little cheap, but I like the keyboard images.
