Fix/android check normal usbhid usage (#9784)

* fix: android check normal usbhid usage

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: android input, ignore composing if is deleting

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-10-30 15:29:52 +08:00 committed by GitHub
parent 711ed28846
commit bae4a2c710
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 20 deletions

View file

@ -224,7 +224,9 @@ class _RemotePageState extends State<RemotePage> {
void _handleNonIOSSoftKeyboardInput(String newValue) {
_lastComposingChangeValid = _textController.value.isComposingRangeValid;
if (_lastComposingChangeValid) {
if (_lastComposingChangeValid && newValue.length > _value.length) {
// Only early return if is composing new words.
// We need to send `backspace` immediately if is deleting letters.
return;
}
var oldValue = _value;