This commit is contained in:
y4my4my4m 2023-05-11 01:30:03 +09:00
parent 4e8be4752b
commit b3e1972622

View file

@ -105,7 +105,6 @@ U0 InputTask(U0 *args) {
// https://theasciicode.com.ar/ascii-control-characters/escape-ascii-code-27.html
input_len = 0;
while (1) {
// Bool shift_pressed = FALSE;
U8 key = KeyGet(&sc);
switch (key)
{
@ -134,22 +133,16 @@ U0 InputTask(U0 *args) {
case SC_TAB:
TCPSocketSendString(sock, 0x09);
break;
// case 0x2A: // Shift
// shift_pressed = TRUE;
// break;
// case 0x01: // Escape
// if (shift_pressed) {
// // Handle Shift + Escape
// force_disconnect = TRUE;
// shift_pressed = FALSE;
// } else {
// // Handle regular Escape
// }
// break;
default:
break;
default:
break;
}
break;
case CH_SHIFT_ESC:
force_disconnect = TRUE;
TCPSocketClose(sock);
"Telnet connection closed.\n";
break;
// send buffer on enter
case '\n':
SysLog(input_buffer);
@ -160,8 +153,9 @@ U0 InputTask(U0 *args) {
Free(temp);
MemSet(input_buffer, 0, BUF_SIZE);
DocClear;
break;
case 3: // CTRL+C
DocBottom(input_task->put_doc);
"\n$$RED$$$BK,1$Input$BK,0$$$BLACK$$:";
break;
default:
if (key >= ' ' && key <= '~') {
@ -184,11 +178,11 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
I64 window_height = 25;
I64 window_left = (GR_WIDTH - window_width) / 2;
I64 window_top = (Fs->win_bottom - Fs->win_top - window_height) / 2;
I64 window_top = (Fs->win_bottom - Fs->win_top - window_height+1) / 2;
// DocPrint(, "$$WW,1$$");
WinHorz(Fs->win_left, Fs->win_left+window_width, Fs);
WinVert(Fs->win_top + window_top, Fs->win_top + window_top + window_height, Fs);
WinVert(Fs->win_top + window_top, Fs->win_top + window_top + window_height+1, Fs);
// DocCursor(OFF);
// WinToTop(Fs);
@ -399,7 +393,8 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
col = window_width-1;
// SysLog("H or f AFTER row:%d, col:%d, cnt:%d\n", row, col, ansi_param_count);
"$$CM,%d,%d$$", row, col;
// "$$CM,%d,%d$$", row, col;
"$$CM,LE=%d,RE=%d$$", row, col;
ptr++;
break;
case 'J':