Technology
ASP.Net & Javascript
Introduction
There are several reasons why you may want to capture the key press event in a browser window. Looking for something like that means that you work as a professional. We will see how you can achive that in internet explorer.
Key codes
In the beginning we will see a list of most used keys with related IE key codes:
- Alphabetic keys (A~Z): ASCII code of uppercase version of the letter 65 to 90
- Space : 32
- Enter : 13
- Tab : 9
- ESC : 27
- Backspace : 8
- Shit : 16
- Control : 17
- Alt : 18
- Caps : 20
- Num : 144
- 0 ~ 9 : 48 ~ 57
- Left : 37
- Up : 38
- Right : 39
- Down : 40
- F1 ~ F12 : 112 ~ 123 (I want here to tell you a note about F1)
Implementation
document.onkeyup = KeyCheck;
function KeyCheck(){var KeyID = event.keyCode;switch(KeyID){ .... }
}
nice Post
ReplyDeleteyou should try it with firefox as well
because a lot of people prefer using it
and please remove the word Verification it is annoying
Thanks Starbon for both comment and advice
ReplyDeleteWait my update to match also firfox
ReplyDelete