correctly handle Alt-Enter

This commit is contained in:
Boris Faure 2015-02-06 23:12:32 +01:00
parent cc6b11a6f5
commit 9814b10ad2
1 changed files with 12 additions and 10 deletions

View File

@ -131,16 +131,18 @@ _handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down *ev,
}
if (!strcmp(ev->key, "Return"))
{
if (ty->state.crlf)
{
termpty_write(ty, "\r\n", sizeof("\r\n") - 1);
return;
}
else
{
termpty_write(ty, "\r", sizeof("\r") - 1);
return;
}
if (alt)
termpty_write(ty, "\033", 1);
if (ty->state.crlf)
{
termpty_write(ty, "\r\n", sizeof("\r\n") - 1);
return;
}
else
{
termpty_write(ty, "\r", sizeof("\r") - 1);
return;
}
}
if (ev->key && ev->key[0] == 'K' && ev->key[1] == 'k')
{