diff --git a/src/window.cpp b/src/window.cpp index 01d0ab8b..55a21cfe 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -380,10 +380,12 @@ void initScreen(GNUC_UNUSED const char *window_title, bool enable_colors) noecho(); curs_set(0); - rl_catch_signals = 0; rl_initialize(); // disable autocompletion rl_bind_key('\t', nullptr); + rl_bind_key(KEY_ESCAPE, nullptr); + // do not catch signals + rl_catch_signals = 0; // overwrite readline callbacks rl_getc_function = rl::read_key; rl_redisplay_function = rl::display_string; diff --git a/src/window.h b/src/window.h index 29430265..b769e16f 100644 --- a/src/window.h +++ b/src/window.h @@ -80,6 +80,7 @@ #define KEY_F12 276 // other handy keys +#define KEY_ESCAPE 27 #define KEY_SHIFT_TAB 353 #define KEY_SPACE 32 #define KEY_TAB 9