Skip to content

UefiHidDxeV2: Add keystroke repeat functionality#883

Merged
makubacki merged 3 commits into
microsoft:release/202511from
joschock:personal/joschock/key_repeat
May 14, 2026
Merged

UefiHidDxeV2: Add keystroke repeat functionality#883
makubacki merged 3 commits into
microsoft:release/202511from
joschock:personal/joschock/key_repeat

Conversation

@joschock
Copy link
Copy Markdown
Contributor

Description

Implement keyboard repeat for held keys, matching the behavior of the
legacy C HidKeyboardDxe driver:

  • 500ms initial delay before repeat begins

  • 20ms repeat rate (~50 keys/sec) while key is held

  • Modifier keys, toggle keys, and non-spacing (dead) keys are excluded

  • Last newly pressed repeatable key wins in multi-key reports

  • Timer cancelled on key release or keyboard reset

  • Impacts functionality?

  • Impacts security?

  • Breaking change?

  • Includes tests?

  • Includes documentation?

How This Was Tested

Included unit tests, tested on hardware at UEFI shell and confirmed expected repeat behavior.

Integration Instructions

None.

@mu-automation
Copy link
Copy Markdown
Contributor

mu-automation Bot commented Apr 29, 2026

⏩ QEMU Validation Skipped

The PR was merged before validation completed.

This comment was automatically generated by the Mu QEMU PR Validation workflow.

@mu-automation mu-automation Bot added the impact:testing Affects testing label Apr 29, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/202511@153d5cb). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release/202511    #883   +/-   ##
================================================
  Coverage                  ?   2.79%           
================================================
  Files                     ?      10           
  Lines                     ?    3180           
  Branches                  ?      81           
================================================
  Hits                      ?      89           
  Misses                    ?    3091           
  Partials                  ?       0           
Flag Coverage Δ
HidPkg 2.79% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread HidPkg/UefiHidDxeV2/src/keyboard.rs Outdated
Comment thread HidPkg/UefiHidDxeV2/src/keyboard.rs Outdated
Comment thread HidPkg/UefiHidDxeV2/src/keyboard/key_queue.rs Outdated
Comment thread HidPkg/UefiHidDxeV2/src/keyboard.rs Outdated
@joschock
Copy link
Copy Markdown
Contributor Author

joschock commented May 1, 2026

@makubacki - thanks for the comments; addressed in latest update.

joschock and others added 3 commits May 14, 2026 09:23
Implement keyboard repeat for held keys, matching the behavior of the
legacy C HidKeyboardDxe driver:

- 500ms initial delay before repeat begins
- 20ms repeat rate (~50 keys/sec) while key is held
- Modifier keys, toggle keys, and non-spacing (dead) keys are excluded
- Last newly pressed repeatable key wins in multi-key reports
- Timer cancelled on key release or keyboard reset

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When the repeating key is released while other keys are still held,
select a new repeat candidate from the remaining held keys and arm
the delay timer. Previously, releasing the repeat key would stop all
repeat even if other repeatable keys were still pressed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@joschock joschock force-pushed the personal/joschock/key_repeat branch from 5a76b0f to cf474d9 Compare May 14, 2026 16:23
@joschock
Copy link
Copy Markdown
Contributor Author

@makubacki or @apop5 - can you take a look and provide a re-approval/merge when ready?

@makubacki makubacki enabled auto-merge (squash) May 14, 2026 16:31
@makubacki makubacki merged commit 54e5632 into microsoft:release/202511 May 14, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:testing Affects testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants