Smart keyboards support on remote input plugin
AbandonedPublic

Authored by albertvaka on Mar 10 2019, 11:51 AM.

Details

Reviewers
mtijink
chansolyang
Group Reviewers
KDE Connect
Summary

Currently, in onCreateInputConnection(), KeyListenerView does not set EditorInfo.inputType to any value.
As a result, InputType gets left in its default value of 0, making IMEs use their 'single-keystrokes-only' mode.

This patch explicitly sets InputType to TYPE_CLASS_TEXT, so that multi-character input will be enabled;
making 'smart' IMEs such as Swiftkey and CJK keyboards usable with the remote input plugin.

Fixes the following bug:
BUG: 365305

Test Plan

Try writing text in the remote input plugin, using various 'smart' keyboards.

Diff Detail

Repository
R225 KDE Connect - Android application
Branch
swypekey
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9439
Build 9457: arc lint + arc unit
chansolyang created this revision.Mar 10 2019, 11:51 AM
Restricted Application added a project: KDE Connect. · View Herald TranscriptMar 10 2019, 11:51 AM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
chansolyang requested review of this revision.Mar 10 2019, 11:51 AM
chansolyang added a comment.EditedMar 10 2019, 12:04 PM

Reading the bug report and the workboard post, I have a feeling that this is supposed to be way harder than a 1-line patch, but as far as I can tell, this makes Swiftkey fully functional inside the remote input plugin.

It seems that both the app and the desktop client is ready to accept multiple unicode characters at a time; it was just that the app wasn't reporting to the IME that it is capable of multi-character input. (I think.)

A welcome side-effect of this change is that non-latin keyboards are also able to directly type into the computer. I've tested this with the Google Korean keyboard, and it was able to send Korean text directly to the computer.

chansolyang edited the summary of this revision. (Show Details)Mar 10 2019, 12:26 PM
mtijink requested changes to this revision.Mar 10 2019, 12:39 PM
mtijink added a subscriber: mtijink.

I tried it, and although it does solve some problems with swype input, it also introduces new problems. An example is using backspace, which doesn't work anymore with your changes.

This revision now requires changes to proceed.Mar 10 2019, 12:39 PM
albertvaka commandeered this revision.Jul 20 2019, 9:09 AM
albertvaka abandoned this revision.
albertvaka added a reviewer: chansolyang.