FramebufferUIView: give it a full UITextInputTraits implementation
Class-level UIKeyInput conformance without UITextInputTraits means iOS falls back to default traits — autocorrect on, predictive on, smart quotes/dashes on. The suggestion engine was swallowing most keystrokes before insertText() could forward them (the "1 in 6 chars" symptom). Declaring all the traits as @objc stored properties with permissive (autocorrect=.no, etc.) values turns every suggestion layer off so each key tap produces exactly one insertText() and hits the remote. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,23 @@ final class FramebufferUIView: UIView,
|
||||
UIGestureRecognizerDelegate,
|
||||
UIPointerInteractionDelegate,
|
||||
UIKeyInput {
|
||||
// MARK: - UITextInputTraits — disable every kind of autocomplete, so
|
||||
// each keystroke produces exactly one insertText() call and nothing
|
||||
// is swallowed by the suggestion/predictive engine.
|
||||
@objc var autocorrectionType: UITextAutocorrectionType = .no
|
||||
@objc var autocapitalizationType: UITextAutocapitalizationType = .none
|
||||
@objc var spellCheckingType: UITextSpellCheckingType = .no
|
||||
@objc var smartQuotesType: UITextSmartQuotesType = .no
|
||||
@objc var smartDashesType: UITextSmartDashesType = .no
|
||||
@objc var smartInsertDeleteType: UITextSmartInsertDeleteType = .no
|
||||
@objc var keyboardType: UIKeyboardType = .asciiCapable
|
||||
@objc var keyboardAppearance: UIKeyboardAppearance = .dark
|
||||
@objc var returnKeyType: UIReturnKeyType = .default
|
||||
@objc var enablesReturnKeyAutomatically: Bool = false
|
||||
@objc var isSecureTextEntry: Bool = false
|
||||
@objc var passwordRules: UITextInputPasswordRules?
|
||||
@objc var textContentType: UITextContentType? = UITextContentType(rawValue: "")
|
||||
|
||||
weak var controller: SessionController?
|
||||
var inputMode: InputMode = .touch
|
||||
var selectedScreen: RemoteScreen? {
|
||||
|
||||
Reference in New Issue
Block a user