mirror of https://github.com/cy384/ssheven.git
send arrow keys correctly via vterm
This commit is contained in:
parent
352f06ae40
commit
241c76e164
17
ssheven.c
17
ssheven.c
|
@ -317,9 +317,26 @@ void event_loop(void)
|
|||
}
|
||||
else if (c)
|
||||
{
|
||||
switch(c)
|
||||
{
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue