Course Content

  • 7.2 keydown - keuyup
  • 7.2 keypress

Course Content


To capture keyboard activity, jQuery provides three keyboard events: keyup(), keydown(), and keypress():

  • keyup() – When the user releases a key on the keyboard, this function is called.
  • keydown() – When the user presses a key on the keyboard, this function is called.
  • keypress() – This function is called whenever the user touches a key on the keyboard.

This functionality has been deprecated and is no longer advised. Though it may still be supported by some browsers, it may have been removed from the relevant web standards, is in the process of being deleted, or is just being retained for compatibility.

When a user presses a keyboard key, Windows Forms generates two events and one event when the user releases a keyboard key: The KeyDown event happens only once. When a user presses the same key repeatedly, the KeyPress event is triggered.

The first feature that I want to talk about is the event handler. This is a function or method that is attached to the event on an element. It gets called when an event occurs and it can either be used to handle the event or stop it from happening.

This question is an important one. The answer is yes and no, depending on the type of page you are trying to use keyboard events on.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere