i want to know that what event fired what happens when any key pressed by keyboard on html page. i want to do that with javascript function i.e if any html page have a text box with focus and then any key will be pressed it will write in text box. so i want fire same event with javascript function i dont want to change text box value directly.
1 more example for make clear what i wanna say. if i have add a event listener for key press and alert something every time when any key pressdown or up. so if any key will be press by keyboard msg will alert. so i want to do same via javascript function or any thing what is available. and then message should be alert every time when any key press via javascript