🔰key event

🚧 under construction

browsereventtype ⟩ key

keydown / keyup – keyboard key is pressed / released.

Despite its name, "keydown" fires not only when the key is physically pushed down. When a key is pressed and held, the event fires again every time the key repeats. Be carefull about this

Using key events to figure out what is being typed is problematic.

  • virtual keyboard on Android phones doesn’t fire key events.

  • input method editor (IME) may use multiple key strokes to create characters.

Elements like <input> and <textarea>, fire "input" events whenever the user changes their content. To get the actual content that was typed, it is best to directly read it from the focused field. 👉 Eloquent JS ⟩ Form Fields

Last updated