window: readline: ignore escape key

This commit is contained in:
Andrzej Rybczak
2014-09-06 13:57:11 +02:00
parent 166242210f
commit 0a7b239b1f
2 changed files with 4 additions and 1 deletions

View File

@@ -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;

View File

@@ -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