feat(keyboard): report the return key in keyboard status

TH
22m ago
+1081-121

Summary

keyboard status now answers what the visible keyboard's return key offers, on both platforms.

Before / after, same command:

$ agent-device keyboard status          # iOS, before: UNSUPPORTED_OPERATION
Keyboard visible: yes                   # after
Return key: done
Return key label: done

$ agent-device keyboard status --json   # Android, Settings search field
{ "platform": "android", "action": "status", "visible": true,
  "returnKey": "search", "inputType": "0x300001", "inputOwner": "app" }

Android parses the focused editor's imeOptions out of the dumpsys input_method output the visibility read already fetched, so no extra adb call; IME_FLAG_NO_ENTER_ACTION outranks the action bits, with the app's actionLabel beside it. iOS gains a read-only keyboardStatus runner command that reads the keyboard's own key elements, so a localized return key keeps its wording; keyboard enter's probe order is unchanged. Both project into one vocabulary (KEYBOARD_RETURN_KEYS): only Android establishes none; unknown means a key this read cannot name; a hidden keyboard reports neither field. Limrun iOS now serves status too.

Touched files: 41.

Validation

Tested at fd62e5fd79. pnpm typecheck, format, lint, generate:capabilities green; affected unit-core projects: 521 files / 5270 tests. Swift runner unit tests, built with AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1: 16 cases, 0 failures. No local check:affected receipt for this head (the branch moved while it waited on the host validation lock), so gates are CI's.

Device evidence (helper 0.21.38-dev, androidSnapshot.backend: android-helper):

  • iOS Simulator 26.2, at this head: Settings search → search/search; Polish keyboard → unknown, label szukaj.
  • Android emulator, Android 17: Settings search → search; tester email → done.