feat: DEL in place of PGDN among the terminal's extra keys

This commit is contained in:
redtea committed 2026-10-14 14:58:06 +03:00
1 parent d456ffe757
commit cf855fdc23
1 file changed
+2 -2
+2 -2
View File
@@ -58,7 +58,7 @@
<button type="button" data-k="left">←</button> <button type="button" data-k="left">←</button>
<button type="button" data-k="down">↓</button> <button type="button" data-k="down">↓</button>
<button type="button" data-k="right">→</button> <button type="button" data-k="right">→</button>
<button type="button" data-k="pgdn">PGDN</button> <button type="button" data-k="del">DEL</button>
</div> </div>
<script src="/static/xterm.js"></script> <script src="/static/xterm.js"></script>
@@ -202,7 +202,7 @@
} }
// xterm's modifier parameter: 1 + shift(1) + alt(2) + ctrl(4). // xterm's modifier parameter: 1 + shift(1) + alt(2) + ctrl(4).
const CSI = { up: 'A', down: 'B', right: 'C', left: 'D', home: 'H', end: 'F' }; const CSI = { up: 'A', down: 'B', right: 'C', left: 'D', home: 'H', end: 'F' };
const TILDE = { pgup: 5, pgdn: 6 }; const TILDE = { del: 3, pgup: 5 };
function keySeq(k) { function keySeq(k) {
const m = useMods(), p = 1 + (m.alt ? 2 : 0) + (m.ctrl ? 4 : 0); const m = useMods(), p = 1 + (m.alt ? 2 : 0) + (m.ctrl ? 4 : 0);
if (CSI[k]) { if (CSI[k]) {