~eliasnaur/gio

1

Keyboard Input and native features: Spell check, Dications, etc

Details
Message ID
<CALGqR9KJCEw6MT=dmuTC=Z5rAmJ=kkuqqd1b8LEiXujk-Qtyfw@mail.gmail.com>
DKIM signature
pass
Download raw message
Hi all,

We've been building an app with GIO (https://git.mills.io/saltyim/app).

Some questions:

- We notice that things like spell-check do not work on iOS and even Android
- Dictation allegedly works on Android, but not on iPhone. Why?

Kind regards

James

-- James Mills / prologic

Join Yarn.social today! The only decentralised social media that
respects your privacy and freedoms!

E:    prologic@shortcircuit.net.au
W:    prologic.shortcircuit.net.au
Blog: Read my Blog
Yarn: @prologic@twtxt.net
Details
Message ID
<CAFcc3FStcdxQdOJxWbrFV9vJgRo73TU8rB142TRCR_02WjSNug@mail.gmail.com>
In-Reply-To
<CALGqR9KJCEw6MT=dmuTC=Z5rAmJ=kkuqqd1b8LEiXujk-Qtyfw@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
Hi James,

> - We notice that things like spell-check do not work on iOS and even Android

Spell-check is a pretty advanced feature. It requires communicating
with some platform text libraries to check the contents of a text
buffer against known dictionaries, gathering a list of candidates that
unknown words could have been meant to be, and presenting an interface
for choosing (or not) to replace mis-spelled words with one of those
candidates. Right now, Gio does not attempt any of this, though
naturally we'd like to have such features available. I don't think we
even have a design in mind for how this should work, however, I can
offer the minimum-effort path forward:

- if Gio extended the editor to expose a query for the position(s) of
a range of runes within its text buffer, you could use this to query
for the rune ranges representing mis-spelled words. You could then
draw an underline beneath the text baseline yourself to indicate that
the word is mis-spelled, and you could lay out a pointer input area to
listen for long-press/secondary-click to present a menu of candidate
words.
- you could then build whatever integration you wanted with the system
spellcheck libraries and simply feed it the contents of the Gio editor
buffer. Each frame, you could decorate the visible contents of the
editor as described above.

This approach requires the least change to Gio internals to implement
what I think you're after, though it also means integrating with the
platform yourself.

I notice that you cited only mobile platforms in your question. Are
you only concerned with mobile spell-checking?

> - Dictation allegedly works on Android, but not on iPhone. Why?

I suspect this is because we support Android's IME (Input Method
Engine) interface at a basic level. This allows fancier soft keyboard
features like swipe, suggestions, etc. To my knowledge, nobody has
tackled iOS IME support, so we use a very primitive software keyboard
input interface on iOS.

I hope that helps!
Chris
Reply to thread Export thread (mbox)