Repository navigation
Forward iOS keyboard composition as Winit IME events - #4836
Open
petralithic wants to merge 3 commits into
Open
petralithic wants to merge 3 commits into
petralithic wants to merge 3 commits into
Conversation
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why this is needed
The iOS Winit view handles basic text insertion and deletion through
UIKeyInput. Apps that enable the IME still lack provisional text andcandidate selection events when people type with keyboards such as Japanese
Kana. This follows the basic iOS support introduced in #3823.
Change
Use a UIKit text field as the software keyboard's first responder while the
IME is enabled. Report its marked text and UTF-8 caret positions as Winit
preedit events, and forward the selected candidate as a commit. Preserve the
ordinary key path for text and deletion outside composition.
Verification
On an iPhone 17 simulator running iOS 27, XCTest tapped
かandなonApple's Kana keyboard, verified provisional
かな, then tapped仮名inthe native candidate bar. The app cleared its preedit and committed
仮名once. The native delete key then left仮.Nightly formatting, Winit core tests, strict UIKit Clippy, the UIKit
simulator test build, Winit's CI documentation command, and the ARM64 iOS
device-target build passed.
An additional direct UIKit rustdoc run with warnings denied found two
unresolved links already present on the upstream base.
Tested on all platforms changed
Added an entry to the
changelogmodule if knowledge of this change couldbe valuable to users
Updated documentation to reflect any user-facing changes, including
notes of platform-specific behavior
Created or updated an example program if it would help users understand
this functionality
The standalone simulator fixture verifies the existing Winit IME API.