Skip to content

Android - Refactor AvaloniaInputConnection#16490

Merged
maxkatz6 merged 1 commit into
masterfrom
android-input-connection-refactor
Aug 1, 2024
Merged

Android - Refactor AvaloniaInputConnection#16490
maxkatz6 merged 1 commit into
masterfrom
android-input-connection-refactor

Conversation

@emmauss

@emmauss emmauss commented Jul 26, 2024

Copy link
Copy Markdown
Contributor

What does the pull request do?

Rewrite parts of AndroidInputConnection to respond to android input more accurately. This implementation is based on compose's InputConnection implementation.

What is the current behavior?

Our current implementation is compatible with GBoard due to its low use of composition apis. But not with some other keyboards, like SwiftKey, that makes extensive use of text composition and prediction. As such, words were being skipped or misplaced in those keyboards.

What is the updated/expected behavior with this PR?

A command queue is now being used to batch ime edits. Each command corresponds to an ime action that would affect the text buffer, like composition, commit, and selection updates. If a batch edit is active(common for composition keyboard like SwiftKey), only when batch edit ends would updates be run on the buffer.
Commands that are run affect the text buffer directly, and updates are forwarded to TextInputMethodClient immediately.

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #16392

@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 11.2.999-cibuild0050524-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@emmauss
emmauss force-pushed the android-input-connection-refactor branch from c2d1072 to df5e9e4 Compare July 29, 2024 08:31
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 11.2.999-cibuild0050586-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6
maxkatz6 added this pull request to the merge queue Aug 1, 2024
@maxkatz6
maxkatz6 removed this pull request from the merge queue due to a manual request Aug 1, 2024
@maxkatz6
maxkatz6 merged commit 20fe710 into master Aug 1, 2024
@maxkatz6
maxkatz6 deleted the android-input-connection-refactor branch August 1, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextBox input from SwiftKey not consistent with other applications

4 participants