Encyclosphere.org ENCYCLOREADER
  supported by EncyclosphereKSF

Keyboard events

From Conservapedia - Reading time: 1 min


Keyboard events occur when the user types on a computer keyboard. The computer can detect which key has been pressed, as well as the exact moment it goes down and is released. Many computer keyboards also have a "typematic" feature: if a key is held down long enough, it starts repeating automatically. This is handy for deleting a dozen or more characters at a time, or entering the same character repeatedly (as when drawing a line of x's across the page).

The main keyboard events (in JavaScript) are:[1]

  • keydown - user strikes key
  • keypress - character is generated
  • keyup - user releases key

Note that keys like Home and End keys do not generate characters. The key codes they generate tell a word processing program to move the cursor.


Notes[edit]

  1. ↑ JavaScript Madness: Keyboard Events

Licensed under CC BY-SA 3.0 | Source: https://www.conservapedia.com/Keyboard_events
117 views | Status: cached on February 19 2023 05:36:08
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF