You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(bidi): keyboard fixes (Enter code, Space key, Abort/NumpadEnter) - #3736
Ports upstream puppeteer #15743 (Enter sends the Enter code ), #15650 (Space key) and #15654 (Abort maps to Cancel, NumpadEnter maps to ) in BidiKeyboard.GetBidiKeyValue. Adds the two upstream keyboard tests.
Upstream parity
Verdict: matches upstream bidi/Input.ts getBidiKeyValue for the three PRs (Enter/NumpadEnter, Abort, Space) and the upstream tests were ported. The /hardkoded:upstream-parity-check skill was not run (not invocable here); I compared the code to upstream by hand. Not verified by tests: the test project build failed locally on the dev-certificate setup, so only the library compile was checked.
Improved keyboard input handling for Enter, Numpad Enter, Space, Cancel, and Abort. Enter and Numpad Enter now produce distinct keyboard codes, and Space inserts a space in text areas.
Tests
Added coverage for Enter and Numpad Enter keyboard codes, newline input, and inserting a space in a text area.
No actionable comments were generated in the recent review.
Walkthrough
The Bidi keyboard mapping now handles Enter, NumpadEnter, Abort, and Space with updated key values. New tests check Enter and NumpadEnter codes and Space insertion into a textarea.
Changes: Bidi keyboard mappings
Layer / File(s)
Summary
Update key mappings and tests lib/PuppeteerSharp/Bidi/BidiKeyboard.cs, lib/PuppeteerSharp.Tests/KeyboardTests/KeyboardTests.cs
The Bidi mapping changes the values for Enter and NumpadEnter, adds Abort as an alias for Cancel, and maps Space to a literal space. Tests check Enter and NumpadEnter codes and Space insertion into a textarea.
hardkoded/puppeteer-sharp#3677: This PR changes the same Bidi keyboard mappings and adds tests for Enter, NumpadEnter, and Space.
Merge Risk: Minimal · up to a5a82
This PR fixes the Enter, NumpadEnter, Abort, and Space key mappings in the Bidi keyboard to match upstream Puppeteer. No concrete merge-blocking risk was found. The new tests should be run in CI to confirm browser behavior.
Pre-merge checks: 3 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Linked Issues check
[#3701] asks for three upstream keyboard fixes: Enter code, Space key, and Abort/NumpadEnter. The diff to lib/PuppeteerSharp/Bidi/BidiKeyboard.cs implements all three in GetBidiKeyValue: Enter maps to…
Build and run the two new tests in KeyboardTests (ShouldSendTheEnterCodeForEnter and ShouldPressTheSpaceKey) against the BiDi-enabled browser setup. Confirm they pass. Also confirm that the existing keyboard tests that use Enter still pass …
Passed checks: 3 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the bidi keyboard fixes that the changeset makes: the Enter code, the Space key, and the Abort/NumpadEnter mappings in BidiKeyboard.GetBidiKeyValue. The title is specific, matches the …
Out of Scope Changes check
All changed hunks map to the objectives in #3701. The BidiKeyboard.cs changes cover Enter, NumpadEnter, Abort, and Space. The KeyboardTests.cs changes are the two upstream-derived tests that support t…
Full details: Title check
Explanation
The title names the bidi keyboard fixes that the changeset makes: the Enter code, the Space key, and the Abort/NumpadEnter mappings in BidiKeyboard.GetBidiKeyValue. The title is specific, matches the main change, and follows the conventional-commit style. It does not list every detail, which is acceptable.
Full details: Out of Scope Changes check
Explanation
All changed hunks map to the objectives in #3701. The BidiKeyboard.cs changes cover Enter, NumpadEnter, Abort, and Space. The KeyboardTests.cs changes are the two upstream-derived tests that support those objectives. No unrelated files or hunks appear in the reviewed diff. The raw summary lists only these two files.
Full details: Linked Issues check
Explanation
[#3701] asks for three upstream keyboard fixes: Enter code, Space key, and Abort/NumpadEnter. The diff to lib/PuppeteerSharp/Bidi/BidiKeyboard.cs implements all three in GetBidiKeyValue: Enter maps to \uE006 (was \uE007), NumpadEnter maps to \uE007, Abort maps to \uE001 with Cancel, and Space maps to " ". The diff also adds two tests in KeyboardTests.cs (Enter/NumpadEnter codes and Space inserting a space into a textarea). The code matches the PR description's summary of the upstream fixes. Two gaps remain. First, the author did not build or run the test project, so the new tests and the behavior change are unverified. Second, the upstream bidi/Input.ts source is not in this repository, so parity with upstream was checked by hand only. The Enter change from \uE007 to \uE006 changes existing behavior and depends on the browser mapping, so it needs runtime confirmation.
Resolution
Build and run the two new tests in KeyboardTests (ShouldSendTheEnterCodeForEnter and ShouldPressTheSpaceKey) against the BiDi-enabled browser setup. Confirm they pass. Also confirm that the existing keyboard tests that use Enter still pass after the \uE006 change. Provide the upstream bidi/Input.ts getBidiKeyValue source or its test expectations so parity can be checked directly.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3701
Ports upstream puppeteer #15743 (Enter sends the Enter code
), #15650 (Space key) and #15654 (Abort maps to Cancel, NumpadEnter maps to) inBidiKeyboard.GetBidiKeyValue. Adds the two upstream keyboard tests.Upstream parity
Verdict: matches upstream
bidi/Input.tsgetBidiKeyValue for the three PRs (Enter/NumpadEnter, Abort, Space) and the upstream tests were ported. The /hardkoded:upstream-parity-check skill was not run (not invocable here); I compared the code to upstream by hand. Not verified by tests: the test project build failed locally on the dev-certificate setup, so only the library compile was checked.Generated by Claude Code
Summary by CodeRabbit