Skip to content

Commit ed46b4c

Browse files
committed
Since we changed the input system, we need to deal with control directly
1 parent 744291a commit ed46b4c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Sources/SwiftTerm/iOS/iOSTerminalView.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,11 @@ open class TerminalView: UIScrollView, UITextInputTraits, UIKeyInput, UIScrollVi
14111411
optionAsMetaKey.toggle()
14121412
} else if key.modifierFlags.contains (.alternate) && optionAsMetaKey {
14131413
data = .text("\u{1b}\(key.charactersIgnoringModifiers)")
1414+
} else if key.modifierFlags.contains (.control) {
1415+
let controlBytes = applyControlToEventCharacters(key.charactersIgnoringModifiers)
1416+
if !controlBytes.isEmpty {
1417+
data = .bytes(controlBytes)
1418+
}
14141419
}
14151420
}
14161421
if let sendableData = data {

0 commit comments

Comments
 (0)