Skip to content

iPhone: arrow keys in a scrolling key row (#287) - #315

Open
oyyblin wants to merge 1 commit into
Saffsanity:mainfrom
oyyblin:phone-arrow-keys
Open

oyyblin wants to merge 1 commit into
Saffsanity:mainfrom
oyyblin:phone-arrow-keys

Conversation

@oyyblin

@oyyblin oyyblin commented Nov 6, 2026

Copy link
Copy Markdown

Closes #287.

What it does

On an iPhone held upright, the key row had esc, tab and the four modifiers but no arrow keys, so arrows needed a hardware keyboard. The row now scrolls sideways like the window thumbnails above it: esc tab ctrl opt cmd shift ← ↓ ↑ →.

  • You can see there's more. Six keys fit fully and over half of ← shows past shift, its arrow fading out at the edge, like the thumbnail strip.
  • A swipe brings the arrows in beside cmd and shift, so ⇧→ (select) and ⌥/⌘ plus an arrow (jump by word or line) are within reach. opt fades at the left edge once scrolled.
  • It stops with a key at the edge, never half a key.
  • Held arrows repeat on the Mac, as the iPad's key row does (Option/CMD + left/right arrows sends the keys just once #162).
  • Nothing else on the screen moves. The row keeps its 44 pt height; PhonePortraitLayout is unchanged and phone-portrait passes as before. Each key is a little narrower to make room for the peek: 49 pt on a 402 pt phone (was 56), 37 pt at 320 pt.
  • iPad layouts are unchanged. One file: iOSClient/PortraitStreamScreen.swift.

Screenshots (iPhone 17 simulator, the layout harness)

At rest Scrolled to the arrows
At rest: ← peeks past shift Scrolled: cmd, shift and the four arrows

The narrowest phone, 320 pt (an iPhone SE with Display Zoom):

320 pt

Compared with #293

#293 also adds iPhone arrows, as a second page of the row reached by a swipe with nothing on screen to say it's there. This PR keeps the arrows visible and leaves out #293's Keys menu and window tiling, so it needs no change on the Mac and no wire change. The two could be combined if #293's Keys menu goes ahead.

Checks

  • run-all.sh phone-portrait tour key-strokes: all passed (484, 732,447 and 505 checks).
  • The iOS app built and ran in the simulator for the screenshots, but only in a scratch copy with one iOS 27.1 Duo call removed, because the machine had Xcode 27.0. CI builds this branch with 27.1.

Not checked (needs a real iPhone)

  • That a swipe starting on esc or an arrow scrolls without sending the key. The scroll view holds a touch back before it becomes a press, which should prevent it; a quick tap is still one press (HeldCap.activated).
  • That holding an arrow starts repeating promptly, given that same hold-back.
  • VoiceOver on the scrolled row.

DEBUG: -SillKeyScroll end starts the row scrolled to the arrows.

🤖 Generated with Claude Code

The phone's key row held esc, tab and the four modifiers only: no arrows
without a hardware keyboard. It is now one row of ten caps that scrolls
sideways, as the window thumbnails above it do: esc, tab, ctrl, opt, cmd,
shift, then left, down, up, right. Six caps fit whole and over half of the
left arrow shows past shift, its chevron fading out at the edge, so the
row says there is more; a swipe brings the arrows in beside cmd and shift
(shift-arrow and option-arrow within reach), and the first caps fade at
the left edge once scrolled. It stops with a cap at the leading edge.

The row keeps its 44 pt, so the picture, the strip and the trackpad do
not move (PhonePortraitLayout unchanged; phone-portrait passes as it was).
The caps are 49 pt wide on a 402 pt phone (were 56) and 37 pt at 320 pt.
The arrows hold and repeat as the iPad's do (HeldCap, Saffsanity#162). The scroll
view holds a touch back before it becomes a press, so a swipe that starts
on esc or an arrow should scroll without sending the key; a quick tap is
still one press (HeldCap.activated). DEBUG: -SillKeyScroll end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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