window: readline: ignore escape key
This commit is contained in:
@@ -380,10 +380,12 @@ void initScreen(GNUC_UNUSED const char *window_title, bool enable_colors)
|
|||||||
noecho();
|
noecho();
|
||||||
curs_set(0);
|
curs_set(0);
|
||||||
|
|
||||||
rl_catch_signals = 0;
|
|
||||||
rl_initialize();
|
rl_initialize();
|
||||||
// disable autocompletion
|
// disable autocompletion
|
||||||
rl_bind_key('\t', nullptr);
|
rl_bind_key('\t', nullptr);
|
||||||
|
rl_bind_key(KEY_ESCAPE, nullptr);
|
||||||
|
// do not catch signals
|
||||||
|
rl_catch_signals = 0;
|
||||||
// overwrite readline callbacks
|
// overwrite readline callbacks
|
||||||
rl_getc_function = rl::read_key;
|
rl_getc_function = rl::read_key;
|
||||||
rl_redisplay_function = rl::display_string;
|
rl_redisplay_function = rl::display_string;
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
#define KEY_F12 276
|
#define KEY_F12 276
|
||||||
|
|
||||||
// other handy keys
|
// other handy keys
|
||||||
|
#define KEY_ESCAPE 27
|
||||||
#define KEY_SHIFT_TAB 353
|
#define KEY_SHIFT_TAB 353
|
||||||
#define KEY_SPACE 32
|
#define KEY_SPACE 32
|
||||||
#define KEY_TAB 9
|
#define KEY_TAB 9
|
||||||
|
|||||||
Reference in New Issue
Block a user