mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-08 18:30:40 +00:00
Enable raw mode for ncurses
This commit is contained in:
parent
0efba6bff6
commit
53ebf90c0c
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user