DescriptionTranslate physical keyboard accents to IME compositions.
On other platforms, the OS IME system generates composition events for
combining characters like accents, but on Android it's the
responsibility of the textbox implementation to do so for physical
keyboards. This patch adds support for that.
This differs from the previous accent implementation
https://codereview.chromium.org/759033002 in that it uses IME
compositions. This is more similar to desktop platforms from the point
of view of Blink/Javascript (I've verified compositionUpdate events are
sent on Mac instead of keycodes), and it avoids complications arising from
artificial backspace characters.
To simplify the if/else blocks, this patch also changes to update
mEditable on ACTION_DOWN instead of up, which also better maps to when
Blink makes the change.
BUG=230921
Committed: https://crrev.com/94e195a2beb75c16a984401707f679781308a413
Cr-Commit-Position: refs/heads/master@{#333150}
Patch Set 1 #Patch Set 2 : Fix bugs, add test #
Total comments: 6
Patch Set 3 : Remove TextInputType early-return #Patch Set 4 : Move mPendingAccent = 0 before finishComposingText early return #
Messages
Total messages: 14 (4 generated)
|