Skip to content

Fix default selection in more-keys popup#2141

Open
minisiowo wants to merge 1 commit into
futo-org:masterfrom
minisiowo:fix-morekeys-default-selection
Open

Fix default selection in more-keys popup#2141
minisiowo wants to merge 1 commit into
futo-org:masterfrom
minisiowo:fix-morekeys-default-selection

Conversation

@minisiowo

Copy link
Copy Markdown

Fixes #2140

Problem

The long-press more-keys popup currently initializes its active key using coordinate-based hit testing based on the last touch position. If the translated touch position misses the popup key area due to touch jitter or event timing, the popup may open without an active (default) selection.

As a result, the default more key (for example, ś for Polish s) may not be selected immediately, and releasing the finger without moving can fail to commit the expected alternative character.

Solution

This change preserves the existing coordinate-based selection behavior while adding a fallback mechanism:

  • the more-keys keyboard now exposes its default key
  • after the synthetic popup onDownEvent(), the panel selects the default key if no key is currently selected
  • drag-based selection continues to work normally after the popup is opened

Testing

Manually tested on a physical device:

  • Polish layout
  • long-press s
  • verified that ś is selected immediately when the popup appears
  • verified that releasing without dragging commits ś
  • repeated the test multiple times; the intermittent missing-selection issue no longer occurred

@futo-cla-pr-labler

Copy link
Copy Markdown

Please sign our contributor license agreement at https://cla.futo.org

@futo-cla-pr-labler

Copy link
Copy Markdown

Please sign our contributor license agreement at https://cla.futo.org

@minisiowo

Copy link
Copy Markdown
Author

Hi, the CLA has been signed. Could you please update the PR status?

@Zvonimir-FUTO Zvonimir-FUTO added the Enhancement Request for a new feature label Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA-signed Enhancement Request for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Missing or delayed default selection in long-press diacritic pop-up

2 participants