HydraIssues

Pressing A on a controller raises the iPad keyboard over a stream, because the key capture field stays interactive and isInputingText outlives the keyboard
open bug Project: hydraheadipad Reporter: 8 Nov 2026 21:50

Description

Reported by the operator on ipad-head-cederik, v0.5.1 build 212, iPadOS 27.2, while playing World of Warcraft with an Xbox Wireless Controller on 2026-11-08.

Every press of the A button raises the iPad software keyboard over the stream. The game still receives the A press, so input forwarding is healthy and this is an unwanted keyboard on the client only.

What is established

Three observations from the operator, each chosen to discriminate:

  1. The keyboard has NO toolbar above it. The Done, Windows, Escape, Tab, Shift, Control, Alt and Delete icon row is assigned as keyInputField.inputAccessoryView in exactly one place, inside toggleKeyboard. Its absence means toggleKeyboard did not run.
  2. The operator HAD opened the keyboard earlier in the same stream, with a three finger tap.
  3. The A press still works in the game.

Ruled out by reading the code:

  • The application's own buttonA handler. ControllerConnection.handleActivation starts with guard focus != .none, and focus is .none for the whole of a stream. It also never touches a keyboard and writes no log line.
  • The menu row added for #1149. toggleKeyboard has exactly three callers: the three finger branch of touchesBegan, the in stream menu row, and the forwarder on StreamFrameViewController. None of them is a button press, and the missing toolbar proves none of them ran.
  • Any controller to keyboard binding in the fork. There is none in ControllerSupport.m.
  • My refactor in #1149. The diff of commit 436b44c shows the [[event allTouches] count] == 3 condition unchanged and the moved body identical.

The defect that is provable

isInputingText goes out of sync with reality, and the hidden field stays interactive.

keyInputField is a KeyboardInputField, a UITextField subclass, created with CGRectZero and added as a subview of the stream view. It is never marked non focusable and its user interaction is never disabled.

isInputingText is set false in only two places: inside toggleKeyboard, and the toolbar Done button. textFieldDidEndEditing: IS implemented, but it only flushes stuck keys:

- (void)textFieldDidEndEditing:(UITextField *)textField {
    for (NSNumber* keyCode in keysDown) {
        LiSendKeyboardEvent([keyCode shortValue], KEY_ACTION_UP, 0);
    }
    [keysDown removeAllObjects];
}

So whenever iOS ends editing by any route other than those two, the application still believes the keyboard is open. In that state the next three finger tap CLOSES instead of opening, which is its own confusing bug, and a live text field remains in the responder chain of a view that a game controller is driving.

The step I cannot prove from this host

Which responder iOS actually activates on the A press. The missing toolbar argues against a plain re activation of keyInputField, because inputAccessoryView stays assigned once set, so it should reappear. That needs a device, or a log line that names the raiser.

Worth noting the application ships Sources/HydraHeadiPad/Info.plist, which declares neither GCSupportsControllerUserInteraction nor LSSupportsGameMode. The fork's own Limelight-Info.plist sets both true but is not the plist that ships. So the application never tells the system that it handles controller input itself, which is the condition under which the system is free to route a gamepad press into the responder chain.

Proposed fix

  1. Keep the flag honest. Set isInputingText = false in textFieldDidEndEditing:, so the recorded state can never outlive the keyboard.
  2. Make the capture field inert while it is not in use. A zero sized hidden field that exists only to buffer keystrokes should not be focusable or interactive when the keyboard is closed. Disable user interaction and focusability on creation and on close, and enable them only in the open branch of toggleKeyboard.
  3. Log every keyboard raise with its caller, so the head log answers the open question above on the next occurrence instead of needing a person.

Item 2 is the one most likely to stop it outright. Items 1 and 3 are correct regardless of what the system is doing.

Immediate workaround

One three finger tap. Because the flag is stuck true, the tap takes the close branch, resigns the field and resyncs the state.

Related

  • #1149 added the menu row, and is NOT the cause, but this is adjacent to it and found by exercising it
  • #1142 is the other controller ownership defect, two writers on focus
  • #1141 is ControllerSupport never being released for a modal stream

Session Context

Venue
cloud-seven