Skip to content

Move the keyboard selector by position and remember the hidden arrow - #93

Merged
PatrickSt1991 merged 1 commit into
mainfrom
keyboard-rows-and-second-pointer
Sep 9, 2026
Merged

PatrickSt1991 merged 1 commit into
mainfrom
keyboard-rows-and-second-pointer

Conversation

@PatrickSt1991

Copy link
Copy Markdown
Contributor

Fixes for issue #92 and issue #91, both from the 2025-set reporter, both with a fault behind them and both in src/common, so all six packages get them.

#92 — the selector jumps two keys between rows, and arrow keys

Both keyboards moved between rows by keeping the column index and clamping it. The rows are centred and the action row is four keys wider than the letter rows, so the same index is two keys to the left on the way down and two to the right on the way up — the reporter's exact numbers. KeyboardLayouts.ColumnAcross now moves by position (in key units, so the two keyboards agree) and lands on the key underneath.

The arrow keys he asked for are a caret in the entry, which was append-only. KeyboardEntry holds text plus caret for both keyboards; ←/→ on the action row move it, and typing, .com, space and back act at the caret. The keys are named left/right in the grid because </> are characters on the symbol page. The action row is 16 keys, so a key is 100px (1736px total, what the 14-key row measured at 116).

#91 — two pointers, one on top of the other, at launch

The page script re-runs install() on every visibilitychange (it exists for single-page navigations wiping the overlay), and install() set the arrow display:block unconditionally with no memory of hide(). visibilitychange also fires when the app comes to the front at launch, so on NUI — where the app draws the pointer itself — the page's arrow came back under the dot at the same fraction. Now hide() is remembered, install() honours it, show() is the only way back, both cursor classes ask for the arrow by name when switching to the page-drawn pointer (which on ElmSharp had never reliably worked), and the NUI reinstall sends install and hide in one evaluation.

Checks

  • ./build.sh all: five packages, 0 warnings; OverscanProbe compiles.
  • tools/keyboard/run.sh (new): grid shape, position-based row moves both ways and at the edges, the caret.
  • tools/pointer/run.sh (new): the shipping script in desktop chromium — fresh install shows, hide survives visibilitychange / re-install / move / a wiped overlay / the whole script re-run, show brings it back. Fails on the previous PageScript.cs at the third check.
  • tools/cdpharness/run.sh: still PASS (the FRAME half was not touched, but the file was).

docs/INTERNALS.md has the two new sections and the 2025-sets state; CLAUDE.md lists the two harnesses.

🤖 Generated with Claude Code

Issue #92: moving between the letter rows and the action row shifted the
selector two keys, because both keyboards kept the column index across
rows of different widths on a centred grid. KeyboardLayouts.ColumnAcross
now picks the key underneath. The same report asked for arrow keys: a
shared KeyboardEntry gives the entry a caret, and left/right on the action
row move it, so a typo in the middle of an address no longer means
retyping everything after it. The action row is 16 keys, so a key is
100px wide (1736px, the width the 14-key row had at 116).

Issue #91: two pointers, one on top of the other, at launch. The page
script re-installs its arrow on every visibilitychange and install() set
it visible unconditionally, so on a set where the app draws the pointer
itself the arrow came back under the dot. hide() is remembered now,
install() honours it, and show() is the one way back; both cursor classes
ask for the arrow by name when switching to the page-drawn pointer, and
the NUI reinstall sends install and hide in one evaluation.

tools/keyboard and tools/pointer hold both fixes off-device; the pointer
harness fails on the previous PageScript.cs at its third check.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@PatrickSt1991
PatrickSt1991 merged commit 481d83c into main Sep 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant