Skip to content

feat(web): accepting a suggestion then adding punctuation should delete automatically added space 🚂 #7163

@mcdurdin

Description

@mcdurdin

Is your feature request related to a problem? Please describe.

From a team review of the Keyman for Android UX (#7161)

When using a lexical model that inserts spaces after an accepted suggestion, it's annoying to have to press backspace before adding punctuation such as full stop.

Describe the solution you'd like

Ideally, delete the space before inserting the punctuation, then re-insert the space after the punctuation.

Unfortunately, this is probably not trivial to solve -- the keyboard itself does not know that the LM inserted the space, so it's not really possible right now to do a special case for punctuation in the keyboard code. Likewise, the LM has no control when the punctuation is typed, so it can't automatically delete the space in this situation.

Furthermore, this is language-specific behaviour: not all LMs insert spaces; some insert ZWSP, or nothing at all after a suggestion.

Per @jahorton: Will need predictive-text design work to properly addressed - pretty sure it’ll need language-specific (or script-specific) data to be defined on the lexical model.

Related issues


Keyman for Windows/macOS/Linux/iPhone/iPad/Android:

  • Device: Samsung A90 5G
  • OS: Android 12
  • Keyman version: 15.0.269-stable

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions