Sometimes we need to catch the user's keyboard actions. As an example : Not to go to form action if keyboard ENTER key is pressed. This can be implemented as below using javascript HTML Form Javascript function