Skip to content

Keys: the iPhone's arrow keys, a second page of the key row (#287) - #293

Open
addhumal wants to merge 2 commits into
Saffsanity:mainfrom
addhumal:keys-menu
Open

addhumal wants to merge 2 commits into
Saffsanity:mainfrom
addhumal:keys-menu

Conversation

@addhumal

@addhumal addhumal commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #287. The Keys menu and its window tiling (#272) moved to #319: one change per pull request.

What it does

  • The iPhone's arrow keys (Arrow Keys #287): a swipe across the key row turns it to a second page: esc, ← ↓ ↑ →, shift.
    • The arrows are held to repeat on the Mac, as an iPad's are (Option/CMD + left/right arrows sends the keys just once #162).
    • A latched modifier carries across pages: ⌥ latched, then ← gives ⌥←.
    • VoiceOver has "Show the arrow keys" (or "Show the modifier keys") on every cap.
    • Nothing in the layout moves: phone-portrait passes unchanged, 484 checks.
  • One file: iOSClient/PortraitStreamScreen.swift.

Next to #315

@oyyblin's #315 answers #287 too, also in one file: the row scrolls sideways (esc tab ctrl opt cmd shift ← ↓ ↑ →), with the arrows peeking in at the edge. Here the row turns a page instead, keeping six full-width caps (56 pt on a 402 pt phone; #315's are 49 pt, 37 pt at 320 pt) but with no visible hint that a swipe turns it. Only one of the two should land; Noah's call.

Checks

  • phone-portrait: 484, unchanged. key-strokes 505 and compatibility 151, as on main.
  • The iOS app for the simulator builds, only the known StreamClient warning.
  • Harness photos of both pages at 320 and 390 pt (before the split; the key row is unchanged by it).

What I tried

  • On a 14-inch MacBook Pro (M4 Pro, macOS 27.0.1), Xcode 27.2: the checks and the build above, and the harness photos. Not on an iPhone.

Problems found, and how they were fixed

  • A fourth row of arrow keys cost too much. It moved 174 pinned numbers of the approved layout, cost every trackpad 52 pt, took the iPhone SE's Larger Picture away, and shrank the SE-with-Display-Zoom picture from 188 to 136 pt. A seventh cap would have been about 35 pt wide, under the 44 pt touch target. Fix: a second page of the same six slots, a swipe away.

Not checked

  • The swipe on a device, and VoiceOver's actions.
  • The page has no visible hint that a swipe turns it.

…with window tiling (Saffsanity#272)

- The iPhone's key row (Saffsanity#287): a second page a swipe across the row away:
  esc, the four arrows and shift, where esc and shift are on the first page.
  The arrows are held to repeat on the Mac (Saffsanity#162), the latched modifiers carry
  across pages (⌥ latched, then ←: ⌥←), and VoiceOver has "Show the arrow
  keys" on every cap. Nothing in the layout moves (a fourth row would have
  cost the trackpad 52 pt and the SE its Larger Picture; a seventh cap would
  be 35 pt wide). DEBUG: -SillKeyPage arrows.
- The Keys menu: a long press on the Keyboard button on every bar (the
  landscape bar, a phone's row 1, the iPad's key-row cap): Lock Screen (⌃⌘Q),
  Force Quit… (⌥⌘⎋), Screenshot… (⇧⌘5), Switch to the Last App (⌘⇥), and the
  Mac's own window tiling (Saffsanity#272: halves, Fill, Center, Return to Previous Size,
  macOS 15's Globe-Control shortcuts). MacShortcut, pure.
- The tiling needs fn: the host now passes a device's bit 23 (the Globe key;
  UIKit has none, so only these shortcuts set it) as maskSecondaryFn, and says
  so in the window list (`fnKey`, additive, only from macOS 15:
  KeyStrokes.fnKey). A device offers the tiling only then: on an older host or
  macOS 14, fn⌃← would arrive as ⌃←, the Space on the left (the review).

Checks: key-strokes 522 checks, 146 of 146 mutants (each shortcut through the
host's KeyStrokes: its key down with exactly its chord, nothing held after);
compatibility 154, 36 of 36; phone-portrait unchanged, 484; run-all.sh all 63;
swift build -c release; the three iOS builds; harness photos of both pages at
320 and 390 pt.
…fsanity#272)

One change per pull request: this one keeps the iPhone's arrow keys (Saffsanity#287), a second page of the key row a
swipe away. The Keys menu, its window tiling and the host's fn bit are on the branch keys-menu-272.
phone-portrait 484 checks, key-strokes 505, compatibility 151; the iOS app for the simulator builds.
@addhumal addhumal changed the title Keys: the iPhone's arrow keys (#287) and a Keys menu with window tiling (#272) Keys: the iPhone's arrow keys, a second page of the key row (#287) Nov 6, 2026
@addhumal addhumal mentioned this pull request Nov 6, 2026

This branch has not been deployed

No deployments
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.

Arrow Keys

1 participant