Skip to content

fix(input): move input-method control to Settings per RFC 0010 IA - #10

Merged
willwade merged 1 commit into
mainfrom
fix/input-mode-settings-ia
Aug 15, 2026
Merged

fix(input): move input-method control to Settings per RFC 0010 IA#10
willwade merged 1 commit into
mainfrom
fix/input-mode-settings-ia

Conversation

@willwade

Copy link
Copy Markdown
Contributor

Follow-up to #9. The joystick PR shipped a toolbar cycle button for input methods — reviewer (rightly) flagged that no other frontend puts this in the toolbar and RFC 0010's settings IA places the steering-method control in Settings (Apple: Access settings; Windows: SettingsPanel). This realigns.

Changes

  • Settings → Input → "Input method" row: dropdown of hardware-supported modes (touch always; tilt with a rotation sensor; joystick with a connected gamepad), descriptive labels, availability-filtered like Apple's compatibility matrix
  • Toolbar button removed (+ unused imports/strings)
  • toggleInputModeapplyInputMode(mode) driven by the picker
  • Input mode persisted (SharedPreferences) and restored on engine init with a hardware fallback to touch — previously the mode silently reset to TOUCH on every activity recreation (rotation, BACK-finish); e2e testing exposed this

Verification done (API 35 emulator + uinput virtual gamepad)

  • Picker offers all three modes with the pad connected; omits joystick without it
  • Selecting Joystick via the picker: held deflection writes ("Koward in "), centring freezes output at 0.0 cps
  • force-stop → relaunch: Joystick restored from prefs and writes; pad absent → falls back to touch
  • assembleDebug + assembleRelease + testDebugUnitTest (25/25) + connectedDebugAndroidTest (4/4) green

Note: the sweep-mode flakiness seen mid-test was the emulator dispatcher's sub-threshold delta filtering (event-amplitude dependent), not app code — held deflections are deterministic.

Refs #6 (stage 2 will surface SP_JOYSTICK_* axis params in this same Input tab).

DCO: commit is Signed-off-by.

The joystick PR (#9) added a toolbar cycle button — but no other frontend
puts input-method switching in the toolbar, and RFC 0010's settings IA
specifies the steering-method control lives in Settings (Apple's Access
settings, Windows' SettingsPanel). This realigns Android:

- InputMethodRow at the top of Settings → Input: dropdown of the modes
  the hardware supports (touch always; tilt with a rotation sensor;
  joystick with a connected gamepad), with descriptive labels.
- Toolbar button removed (also drops the now-unused Crosshair/Smartphone
  imports and toolbar strings).
- toggleInputMode → applyInputMode(mode) driven by the picker.
- Input-mode choice is now persisted (SharedPreferences) and restored on
  engine init, with a hardware-availability fallback to touch — the mode
  previously reset to touch on every activity recreation (rotation,
  BACK-finish), which testing exposed.

Follows-up #9; refs issue #6 stage 2 notes.

Verified:
- e2e on API 35 emulator + uinput virtual gamepad: picker offers all
  three modes with the pad connected; selecting Joystick steers (wrote
  'Koward in' from a held deflection) and centring freezes output at
  0.0 cps; force-stop → relaunch restores Joystick and writes; pad
  absent → picker omits joystick, restore falls back to touch.
- assembleDebug + assembleRelease + testDebugUnitTest (25/25) +
  connectedDebugAndroidTest (4/4) green.

Signed-off-by: will wade <willwade@gmail.com>
@willwade
willwade merged commit e595ab3 into main Aug 15, 2026
2 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