feat: add Return key to mobile keybar in bottom-right position

This commit is contained in:
GitHub Copilot
2026-01-28 08:31:11 +00:00
parent 99e44b3310
commit 4e442970c9
2 changed files with 14 additions and 6 deletions
File diff suppressed because one or more lines are too long
+7 -3
View File
@@ -557,6 +557,7 @@ class WebTerminal {
<button data-key="\\x1b[B" title="Down">↓</button> <button data-key="\\x1b[B" title="Down">↓</button>
<button data-key="\\x1b[D" title="Left">←</button> <button data-key="\\x1b[D" title="Left">←</button>
<button data-key="\\x1b[C" title="Right">→</button> <button data-key="\\x1b[C" title="Right">→</button>
<button data-key="\\r" title="Return" class="keybar-return">⏎</button>
`; `;
// Inject styles // Inject styles
@@ -566,8 +567,8 @@ class WebTerminal {
position: fixed; position: fixed;
bottom: 80px; bottom: 80px;
right: 0; right: 0;
display: flex; display: grid;
flex-wrap: wrap; grid-template-columns: repeat(5, auto);
gap: 4px; gap: 4px;
padding: 6px; padding: 6px;
background: rgba(40, 40, 40, 0.95); background: rgba(40, 40, 40, 0.95);
@@ -575,7 +576,6 @@ class WebTerminal {
box-shadow: 0 2px 10px rgba(0,0,0,0.3); box-shadow: 0 2px 10px rgba(0,0,0,0.3);
z-index: 10000; z-index: 10000;
touch-action: none; touch-action: none;
max-width: 200px;
user-select: none; user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
} }
@@ -608,6 +608,10 @@ class WebTerminal {
.mobile-keybar .keybar-drag:active { .mobile-keybar .keybar-drag:active {
cursor: grabbing; cursor: grabbing;
} }
.mobile-keybar .keybar-return {
grid-column: 5;
grid-row: 2;
}
`; `;
document.head.appendChild(style); document.head.appendChild(style);
document.body.appendChild(keybar); document.body.appendChild(keybar);