Skip to content

Commit 6eb57f7

Browse files
committed
fix: polish mobile native terminal input
1 parent e7ac8be commit 6eb57f7

18 files changed

Lines changed: 537 additions & 57 deletions

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ All notable changes to this project will be documented in this file.
99
### Fixed
1010

1111
- Added right-click copy for selected desktop terminal text, clearing the selection after copying so Windows users can copy terminal output without sending `Ctrl+C` to the running process.
12+
- Fixed mobile terminal `Ctrl+C` delivery so interrupt input is sent once immediately and is not retried as stale terminal input.
13+
- Fixed mobile native terminal replay so Android and iOS no longer forward emulator-generated OSC/DSR replies back into the remote host input stream.
14+
- Improved mobile keyboard lift behavior by using native cursor metrics instead of resizing the terminal viewport blindly when the software keyboard is shown.
15+
- Improved Android terminal text selection handles by reusing the Termux material handle assets and aligning the handle anchors with selected terminal cells.
16+
- Added iOS bundle localization declarations so native terminal selection menus can follow the app/device language instead of defaulting to English-only metadata.
1217

1318
## [1.8.1] - 2026-06-16
1419

CHANGELOG.zh-CN.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
### 修复
1010

1111
- 桌面端终端新增选中文本后右键复制,并在复制后取消选区,Windows 用户复制终端输出时不再需要使用可能中断进程的 `Ctrl+C`
12+
- 修复移动端终端 `Ctrl+C` 发送链路,中断输入会立即发送一次,不再作为过期终端输入被重试。
13+
- 修复移动端原生终端回放时 Android / iOS 将 emulator 自动生成的 OSC / DSR 响应反向写回远程 Host 输入流的问题。
14+
- 优化移动端软键盘上推逻辑,改为使用原生终端光标位置计算,不再盲目 resize 终端 viewport。
15+
- 优化 Android 终端拖选手柄,复用 Termux material 手柄资源,并让手柄锚点与终端选中单元格对齐。
16+
- 补充 iOS bundle 本地化声明,原生终端选择菜单可以跟随应用 / 设备语言,不再只按英文元数据显示。
1217

1318
## [1.8.1] - 2026-06-16
1419

apps/mobile/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ Important changes to this project are documented here.
44

55
## [Unreleased]
66

7+
## [1.8.2] - 2026-06-17
8+
9+
### Fixed
10+
11+
- Fixed terminal `Ctrl+C` from the mobile toolbar so it sends a raw ETX once and does not retry stale interrupt input.
12+
- Fixed native terminal replay on Android and iOS so local emulator-generated OSC/DSR responses are not echoed back into the remote host input stream.
13+
- Improved software-keyboard lifting by using native terminal cursor metrics, keeping the cursor visible without forcing a terminal viewport resize.
14+
- Improved Android terminal text selection with Termux material handle assets and cell-aligned handle anchors.
15+
- Added iOS bundle localization metadata so native terminal selection controls can follow the app/device language.
16+
717
## [1.8.1] - 2026-06-16
818

919
### Changed

apps/mobile/CHANGELOG.zh-CN.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
## [Unreleased]
66

7+
## [1.8.2] - 2026-06-17
8+
9+
### 修复
10+
11+
- 修复移动端工具栏 `Ctrl+C`,现在会直接发送一次原始 ETX,不再重试过期的中断输入。
12+
- 修复 Android / iOS 原生终端回放时,本地 emulator 自动生成的 OSC / DSR 响应被回写到远程 Host 输入流的问题。
13+
- 优化软键盘上推逻辑,改为使用原生终端光标位置,让光标可见且不强制 resize 终端 viewport。
14+
- 优化 Android 终端文字拖选,复用 Termux material 手柄资源,并让手柄锚点与终端选中单元格对齐。
15+
- 补充 iOS bundle 本地化元数据,原生终端选择控件可以跟随应用 / 设备语言。
16+
717
## [1.8.1] - 2026-06-16
818

919
### 调整

apps/mobile/android/app/src/main/kotlin/com/duxweb/codux/terminal/CoduxNativeTerminalPlugin.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,22 @@ object CoduxNativeTerminalPlugin {
116116
),
117117
)
118118
}
119+
120+
override fun onCursorMetrics(
121+
cursorRow: Int,
122+
cursorCol: Int,
123+
lineHeight: Double,
124+
) {
125+
emit(
126+
mapOf(
127+
"id" to viewId,
128+
"type" to "cursor",
129+
"cursorRow" to cursorRow,
130+
"cursorCol" to cursorCol,
131+
"lineHeight" to lineHeight,
132+
),
133+
)
134+
}
119135
},
120136
)
121137
views[viewId] = nativeView

0 commit comments

Comments
 (0)