The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. -- Tom Cargill
Log In
Providing Microsoft .NET Articles and Code Samples since 2002
Home
→
Articles
→
Javascript Char Codes (Key Codes)
→
Comment
Home
Search
Articles
Categories
About
Welcome to my blog and project site for Microsoft.NET development.
I've been a full time .NET developer for ten years, but I didn't start my professional life as a programmer ...
more
Share/Print this page:
Please enter your reply for the comment shown below:
Post Your Comment
You may post without logging in or
login here
.
Display Name:
Required.
Email:
Required. Will not be shown. Used for identicon.
Comment:
Allowed tags: <quote></quote>, <code></code>, <b></b>, <i></i>, <u></u>, <red></red>
Please type text as shown in the image at left.
Posted
2009 Aug 05 06:04 AM
.
reply
The position of the special characters depends on the language of the keyboard, so that might have an effect on which key gives which code. For example the Finnish keyboard has / (backslash) where this code presents ' (semicolon), and American keyboards naturally don't have å, ä or ö. You should keep in mind that hard-coding the positions of the special characters is language dependent. Think of it like this: Javascript can only determine "this is the 13th key on the second row on the keyboard", it can't tell what character is actually printed on that key.
Anna