From 518b995720e8eb04b22848313fe278a268e3312b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 14 Aug 2014 00:30:32 +0100 Subject: [PATCH] NCurses: properly handle ctrl+alt --- src/ncurses.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ncurses.cc b/src/ncurses.cc index d3ab4b41..5ae9d083 100644 --- a/src/ncurses.cc +++ b/src/ncurses.cc @@ -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; }