Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

I2I: prefix dead keys support in the input pipeline

0 views
Skip to first unread message

Filip Filmar

unread,
Oct 13, 2021, 8:20:34 PM10/13/21
to ui-inp...@fuchsia.dev
Hi folks.

This is to let you know that I intend to implement prefixed dead keys support in the input pipeline, for international keyboards. (fxbug.dev/75723).

The keymaps today rely on postfix composition, which is not how most dead key keyboards work.

The main idea is to add a mini state machine into the input pipeline that monitors for combining characters and retains them until a followup character comes in, or a change of focus occurs.  If a followup character comes in, the combining character is normalized with the followup character and the resulting code point is emitted.  If a change of focus occurred, the retained combining character is flushed.

A slight complication in this process is that dead keys need to be communicated both to key event clients and to text field editors.  So placing this state machine early into the input pipeline won't work, as it would not allow text field editors to see the dead keys as they come in.

This suggests to me that the change needs to be made in the text_manager binary, not the input pipeline library, to ensure that the keyevent pipeline does not steal keys from the editor.

HTH,
F

Mukesh Agrawal

unread,
Oct 14, 2021, 1:58:24 PM10/14/21
to Filip Filmar, ui-inp...@fuchsia.dev
So I'm not sure if I have an opinion yet on whether this is implemented in the input pipeline or the text manager, but...

I don't follow why this _can't_ be implemented in the input pipeline. It seems like we could have an input pipeline
stage which tracks dead keys to populate KeyMeaning, similarly to how we track shift state to emit lowercase
vs uppercase in KeyMeaning.

Text field editors could ignore `KeyMeaning`s, and just track the `Key`s.

Would that not work?

--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "ui-input-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ui-input-dev...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/ui-input-dev/CAGEh6bhnyRaJWf4ta1F%2BH2qRkU6jcmtkNLFEKoWLqdbT%2BmX%3DoA%40mail.gmail.com.

Filip Filmar

unread,
Oct 14, 2021, 2:16:06 PM10/14/21
to Mukesh Agrawal, ui-inp...@fuchsia.dev
On Thu, Oct 14, 2021 at 10:58 AM Mukesh Agrawal <qui...@google.com> wrote:

Text field editors could ignore `KeyMeaning`s, and just track the `Key`s.

Would that not work?

That could work for keyboards provided that they emit Keys.  We could also propagate an explicit dead-keyness signal, which doesn't need to go past the input pipeline; which may be more generally applicable.

F

Mukesh Agrawal

unread,
Oct 15, 2021, 5:25:36 PM10/15/21
to Filip Filmar, ui-inp...@fuchsia.dev
On Thu, Oct 14, 2021 at 11:16 AM Filip Filmar <fm...@google.com> wrote:
That could work for keyboards provided that they emit Keys.  We could also propagate an explicit dead-keyness signal, which doesn't need to go past the input pipeline; which may be more generally applicable.

Interesting. In terms of keyboards that don't emit Keys, are you thinking of virtual keyboards primarily, or something else too? Reason for my question: I wouldn't have thought we needed a notion of dead keys for virtual keyboards. But perhaps you've thought of some cases I didn't consider...

Alice Neels

unread,
Oct 15, 2021, 6:27:32 PM10/15/21
to Mukesh Agrawal, Filip Filmar, ui-inp...@fuchsia.dev
I think we can consider virtual keyboards with dead keys out of scope for now & revisit if that ever changes. An on-screen input method has a number of options to enter these characters that don't rely on dead key handling in the input pipeline.

-A

--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "ui-input-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ui-input-dev...@fuchsia.dev.

Filip Filmar

unread,
Oct 18, 2021, 1:04:33 PM10/18/21
to Alice Neels, Mukesh Agrawal, ui-inp...@fuchsia.dev
On Fri, Oct 15, 2021 at 3:27 PM Alice Neels <nee...@google.com> wrote:
I think we can consider virtual keyboards with dead keys out of scope for now & revisit if that ever changes. An on-screen input method has a number of options to enter these characters that don't rely on dead key handling in the input pipeline.

OK.

I was trying to set things up so that the paths for the virtual and physical keyboard don't diverge much. But if this is not of interest now, it's going to be simpler of course.

F
 

Mukesh Agrawal

unread,
Oct 18, 2021, 1:52:59 PM10/18/21
to Filip Filmar, Alice Neels, ui-inp...@fuchsia.dev
On Mon, Oct 18, 2021 at 10:04 AM Filip Filmar <fm...@google.com> wrote:
I was trying to set things up so that the paths for the virtual and physical keyboard don't diverge much. But if this is not of interest now, it's going to be simpler of course.

Thanks for thinking of VK! Glad we could simplify it, though. :-)
Reply all
Reply to author
Forward
0 new messages