Repository navigation
fix(device): forward numeric keypad keys to iOS simulators - #23339
maria-rcks merged 2 commits into
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Adds standard HID mappings for numeric keypad keys so the existing iOS simulator input path forwards them instead of dropping them. The accompanying regression test covers all new mappings and existing key behavior, with no protocol, server, configuration, or deployment changes. You can add or adjust custom eligibility rules. Learn more. |
|
Note Written by Verified in a real dev environmentNo changed behavior could be exercised on this Linux Boat VM. This is an unverifiable result, not a runtime pass. Inspected the description, full diff, commits, discussion, reviews and inline comments at The environment check failed before app setup: The local device host explicitly rejects iOS on non-macOS hosts with Inspection and prerequisite transcript Not verifiedOriginal-bug reproduction on No installs, dev servers, provider turns, local checks, screenshots or recordings were produced because the required native endpoint is unavailable. A Codex turn would not exercise this keyboard transport. The author’s existing captures were not reused as proof of this run. No source changes or pushes were made. Verification requires a real macOS/Xcode simulator host: compare main and this exact head through the Device panel, using a focused simulator text field and matching keypad and main-keyboard input, and capture the resulting text and Enter submission. |
|
Note Written by Verified in a real dev environmentno changed behavior could be exercised in this run. result: unverifiable, with no runtime pass claimed. inspected the open pr at this vm fails the native prerequisite: the device host rejects ios on non-macos hosts with prerequisite and inspection transcript Not verifiedmain reproduction and candidate behavior through the running device panel remain unverified: keypad digits, decimal, operators, equal, enter and releases. nearby top-row digits, main enter and modifiers remain unverified, as do android, native mobile clients and physical keyboards. no worktree installs, dev servers, provider turns, local checks, screenshots or recordings were produced because the required native endpoint is unavailable. a codex turn would not exercise the changed keyboard transport. no source changes or pushes were made, and no task-owned processes remain. verification needs a macos/xcode simulator host. compare main and this exact head through the device panel with a focused text field, checking keypad input and main-keyboard controls. the existing author captures were not reused as evidence for this run. |
Problem
Typing on a numeric keypad in the iOS device preview does nothing. The preview consumes each keyboard event, but the shared iOS HID lookup has no
Numpad*entries, sosendKeydrops both the press and release. Top-row digits and the main Enter key already work.To reproduce, open an iOS simulator in the Device panel, focus a text field, and type digits or press Enter on a numeric keypad.
Change
Add 17 keypad entries to the existing HID table: digits, Enter, decimal, equal and the four arithmetic operators. Use the standard keyboard/keypad usages, preserving keypad identity without synthesizing shifted main-keyboard keys. The usages match Apple's HID definitions.
The shared transport serves web, desktop and the mobile device WebView. The packet format and server stay unchanged. Android follows a separate mapping and is unchanged.
Scope and approval
This is a small, focused fix for an obvious omission in an existing input path. It adds table entries and one protocol regression test. No setting, UI control or protocol extension is introduced. No issue for this defect was found.
Verification
Built production web apps from base
a8bb769d65and candidateff46c9f0df, with separate source copies and server state. Chrome 154 on Linux drove the Device panel, streaming Safari on an iOS 26.5 simulator. No provider run was started.Chrome's keyboard automation sent the same
Numpad*key codes the input handler receives from a numeric keypad. Starting with a top-row9, keypad123.45leaves the base field at9; the candidate shows9123.45. Keypad Enter does nothing on the base and submits Safari's search on the candidate. The candidate also enters+,-,*and/from the keypad.These recordings show the Device panel on a second fresh iOS 26.5 simulator. Each caption names the build and the keys sent. A grey box covers the search results that load after Enter.
MP4 copies: base recording, candidate recording.
Base: the top-row
9works, but keypad123.45and Enter leave it unchanged.Candidate: the same digit sequence produces
9123.45.Candidate: the four keypad operators append
+-*/.Candidate: keypad Enter submits the query in Safari.
Focused checks:
packages/client-runtime,pnpm exec vp test run src/device/stream.test.ts -t 'encodes keypad presses': the new test fails on the base, receiving 4 packets instead of 38. Only the existing top-row digit and main Enter are sent.pnpm exec vp test run src/device/stream.test.ts: all 15 tests pass on the candidate. The regression decodes the binary packet tag and JSON payload for 17 keypad keys and the two existing controls, in both phases. It uses no timer waits or mock-call assertions.pnpm run typecheckin that package: passes.pnpm exec vp lint packages/client-runtime/src/device/stream.ts packages/client-runtime/src/device/stream.test.tsandpnpm exec vp fmt --checkon those files: pass.pnpm exec vp buildin each production copy'sapps/web: both pass.The new regression fails on the base.
All device-stream tests pass on the candidate.
Not checked: a physical USB keyboard, the mobile WebView with an attached keyboard, and Android UI.
NumpadEqualpasses the protocol regression, but Chrome's automation rejects that key name, so it was not exercised on the simulator. The native run covers digits 1–5, decimal, the four arithmetic operators and Enter; the regression covers all 17 added usages.Prior PRs: no earlier PR for this defect found. #21200 by Reda Hilal fixes keypad app-zoom shortcuts, a different input path. This change reuses no code from it.
Production fix, tests, PR description and images written with GPT-6.1 Sol in T3 Code Nightly.
🤖 Generated with GPT-6.1 Sol in T3 Code Nightly