DOM Manipulation

Keyboard Events

Keyboard Events

MediumDOM ManipulationEvent ConceptsPRO

Use a keydown event to close a DOM dialog only when Escape is pressed. This exercise checks event data, ignored keys, and visible modal state.

What you'll practice

  • Use a keydown event to close a DOM dialog only when Escape is pressed
  • This exercise checks event data
  • Ignored keys
  • Visible modal state

Unlock full access

Choose a plan and go straight to secure checkout.

  • All 600+ interactive exercises
  • Full course curriculum
  • Access to guided projects
  • All future content included

Secure checkout with Stripe. Cancel anytime.