Enable raw mode for ncurses
@@ -92,7 +92,7 @@ impl Backend {
ncurses::noecho();
// This disables buffering and some input processing.
// TODO: use ncurses::raw() ?
- ncurses::cbreak();
+ ncurses::raw();
// This enables color support.
ncurses::start_color();
// Pick up background and text color from the terminal theme.
@@ -482,6 +482,9 @@ fn initialize_keymap() -> HashMap<i32, Event> {
for c in 1..26 {
let event = match c {
+ // This is Ctrl+C
+ // TODO: Don't exit here, but add this as a default callback
+ 3 => Event::Exit,
9 => Event::Key(Key::Tab),
10 => Event::Key(Key::Enter),
other => Event::CtrlChar((b'a' - 1 + other as u8) as char),
