Skip to content

Fix: KeyDown repeats while key is held down (not just KeyPress)#2226

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-keydown-repeats-on-hold
Draft

Fix: KeyDown repeats while key is held down (not just KeyPress)#2226
Copilot wants to merge 3 commits intomainfrom
copilot/fix-keydown-repeats-on-hold

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

Docs incorrectly stated that KeyDown fires only once per keypress. In reality, both KeyDown and KeyPress fire repeatedly at the OS repeat rate while a key is held—KeyUp is the only event that fires exactly once.

KeyDown   ← fires
KeyPress  ← fires
KeyDown   ← repeats while held
KeyPress  ← repeats while held
KeyUp     ← fires once on release

Changes

  • events.md — Fixed bullet stating "The KeyDown event occurs once"; updated table description to clarify repeat behavior; full style-guide edit pass; date updated to 04/20/2026.
  • overview.md — Rewrote the "Order of keyboard events" sequence, which previously implied only KeyPress repeats on hold. Now correctly shows both KeyDown and KeyPress fire on each key-repeat cycle.
  • handling-user-input.md — Fixed KeyDown table row from "Raised only when a key is initially pressed" to reflect the repeat behavior.

Copilot AI linked an issue Apr 20, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix KeyDown event repeating while key is held down Fix: KeyDown repeats while key is held down (not just KeyPress) Apr 20, 2026
Copilot AI requested a review from adegeo April 20, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyDown repeats while key is held down

2 participants