O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling Keyboard Events

An often forgotten event when working with web pages is the keyboard event. However, keyboard events can be some of the most useful, especially if you are trying to make your web site feel more like a web app.

Users are accustomed to hot keys that perform different functions and interactions as you enter data into fields in applications. Keyboard events let you accomplish just that. The following phrases show you how to detect keyboard input and utilize the event object to determine which key(s) were pressed.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required