Add tmux terminal shortcut controls
Gitea Smoke / smoke (push) Successful in 0s
Gitea Android APK / build (push) Successful in 12m0s

This commit is contained in:
Codex
2026-07-06 03:47:56 +00:00
parent d655fd7e09
commit e077fa5d14
3 changed files with 37 additions and 4 deletions
@@ -620,7 +620,12 @@ public final class MainActivity extends Activity {
"Page up",
"Page down",
"Session status",
"Send command"
"Send command",
"Tmux prefix",
"Detach tmux client",
"New tmux window",
"Next tmux window",
"Previous tmux window"
};
new AlertDialog.Builder(this)
.setTitle(sessionName)
@@ -655,6 +660,21 @@ public final class MainActivity extends Activity {
case 6:
promptSendCommand(sessionName);
break;
case 7:
sendTerminalInput("\u0002");
break;
case 8:
sendTerminalInput("\u0002d");
break;
case 9:
sendTerminalInput("\u0002c");
break;
case 10:
sendTerminalInput("\u0002n");
break;
case 11:
sendTerminalInput("\u0002p");
break;
default:
break;
}
@@ -1169,6 +1189,13 @@ public final class MainActivity extends Activity {
addSoftKey(row, "^A", "\u0001");
addSoftKey(row, "^E", "\u0005");
addSoftKey(row, "^V", "\u0016");
addSoftKey(row, "^Z", "\u001a");
addSoftKey(row, "^\\", "\u001c");
addSoftKey(row, "Tmux", "\u0002");
addSoftKey(row, "Detach", "\u0002d");
addSoftKey(row, "NewWin", "\u0002c");
addSoftKey(row, "NextWin", "\u0002n");
addSoftKey(row, "PrevWin", "\u0002p");
addSoftKey(row, "Left", "\u001b[D");
addSoftKey(row, "Down", "\u001b[B");
addSoftKey(row, "Up", "\u001b[A");