NCurses: properly handle ctrl+alt

This commit is contained in:
Maxime Coste 2014-08-14 00:30:32 +01:00
parent 2204b7cf06
commit 518b995720

View File

@ -437,7 +437,11 @@ Key NCursesUI::get_key()
const Codepoint new_c = getch();
timeout(-1);
if (new_c != ERR)
{
if (new_c > 0 and new_c < 27)
return ctrlalt(Codepoint(new_c) - 1 + 'a');
return alt(new_c);
}
else
return Key::Escape;
}