javascript Club
registrarse
Fanpop
New Post
Explore Fanpop
In this post, tu can test yourself on which key tu were pressed. When tu get this event contains all the event information that tu might need to write your own code.

Sometimes tu need to prevent some keyboard key operations like prevent to select all text, copy, paste, etc. At that time tu need to write a JavaScript keyboard event function to handle it as per your need.

link
The following JavaScript code, when a keypress event fires, tu will get all event properties. For example, when tu pressing “1”, tu will get “49” value. It is recommended to write logic on an event.which instead of event.keyCode and event.charCode.