Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Backspace from a third-party iOS keyboard is ignored in the terminal #11449

ClosedKristjanPikhof(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. Open the integrated terminal in T3 Code on iOS.
  2. Use a third-party iOS keyboard whose Backspace button calls Apple's standard textDocumentProxy.deleteBackward() API.
  3. Type several characters, such as abc.
  4. Tap Backspace.

Expected behavior

One Backspace tap deletes the character before the terminal cursor.

Actual behavior

Typing works, but Backspace leaves the terminal text unchanged.

Impact

Major degradation or frequent failure. Editing terminal input requires switching keyboards.

Environment

  • Reported on iOS 26.6.
  • Investigated with a minimal UIKit host on an iPhone 17 Pro simulator running iOS 26.5.

Logs or stack traces

The simulator host reproduced T3's empty-text-field input pattern. Tracing showed two different deletion paths:

  • Apple's keyboard called the field's deleteBackward() override.
  • The third-party keyboard's proxy deletion reached textField(_:shouldChangeCharactersIn:replacementString:) with an empty replacement string instead.

Screenshots, recordings, or supporting files

In T3TerminalView.swift, the delegate forwards nonempty replacements but returns false without emitting anything for an empty replacement. The separate deleteBackward() override already emits terminal DEL for Apple's keyboard path.

Suggested change: also emit DEL in the empty-replacement branch:

     if !string.isEmpty {
       // Some software keyboards deliver Return through this delegate instead of
       // textFieldShouldReturn, so normalize that path too.
       emitInput(TerminalInputSequence.normalizingReturn(string))
       return false
     }

+    emitInput("\u{7F}")
     return false

Handling that callback restored one-character deletion in the simulator host with the third-party keyboard. Apple's keyboard still deleted exactly once. The actual T3 app has not been rebuilt or tested with this change.

Related: #8253 reports Android/FUTO backspace behavior, involving a different native input implementation.

Workaround

Switch to Apple's built-in keyboard. This worked in the simulator reproduction.

Sign in to join this conversation.