mirror of https://github.com/cy384/ssheven.git
send arrow keys correctly via vterm
This commit is contained in:
parent
352f06ae40
commit
241c76e164
23
ssheven.c
23
ssheven.c
|
@ -317,9 +317,26 @@ void event_loop(void)
|
||||||
}
|
}
|
||||||
else if (c)
|
else if (c)
|
||||||
{
|
{
|
||||||
if ('\r' == c) c = '\n';
|
switch(c)
|
||||||
ssh_con.send_buffer[0] = c;
|
{
|
||||||
ssh_write(ssh_con.send_buffer, 1);
|
case kLeftArrowCharCode:
|
||||||
|
vterm_keyboard_key(con.vterm, VTERM_KEY_LEFT, VTERM_MOD_NONE);
|
||||||
|
break;
|
||||||
|
case kRightArrowCharCode:
|
||||||
|
vterm_keyboard_key(con.vterm, VTERM_KEY_RIGHT, VTERM_MOD_NONE);
|
||||||
|
break;
|
||||||
|
case kUpArrowCharCode:
|
||||||
|
vterm_keyboard_key(con.vterm, VTERM_KEY_UP, VTERM_MOD_NONE);
|
||||||
|
break;
|
||||||
|
case kDownArrowCharCode:
|
||||||
|
vterm_keyboard_key(con.vterm, VTERM_KEY_DOWN, VTERM_MOD_NONE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if ('\r' == c) c = '\n';
|
||||||
|
ssh_con.send_buffer[0] = c;
|
||||||
|
ssh_write(ssh_con.send_buffer, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case mouseDown:
|
case mouseDown:
|
||||||
|
|
Loading…
Reference in New Issue