mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
ecd3b62b8e
tail as a garbage input. To reproduce, run "sleep 3" and hold down Down_Arrow key until sleep runs. With debugging log enabled, the following can be seen: entered get_key_code(no_delay:0) c=tty_lowlevel_getch()=27 push_char(27) !0 c=xgetch_second()=91 push_char(91) !0 2 c=tty_lowlevel_getch()=66 push_char(66) seq_buffer[0]:27 <---- the saved Down Arrow sequence "ESC [ B" seq_buffer[1]:91 seq_buffer[2]:66 seq_buffer[3]:0 pending_keys!=NULL. m=-1 d=*pending_keys++=27 d=ALT(*pending_keys++)=ALT(91)=8283 ^^^^^^^^^^^^^^^^^^^^^^^ we misinterpret "ESC [ B" as "ESC [" return correct_key_code(8283) entered get_key_code(no_delay:0) pending_keys!=NULL. m=-1 d=*pending_keys++=66 ^^^^^^^^^^^^ we think user pressed "B" return correct_key_code(66) With this patch, no bogus "input" is generated. Longer unknown sequences need an additional fix, coming next. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Slava Zanko <slavazanko@gmail.com> |
||
---|---|---|
.. | ||
color-internal.c | ||
color-internal.h | ||
color-ncurses.c | ||
color-slang.c | ||
color-slang.h | ||
color.c | ||
color.h | ||
key.c | ||
key.h | ||
keyxdef.c | ||
Makefile.am | ||
mouse.c | ||
mouse.h | ||
tty-internal.h | ||
tty-ncurses.c | ||
tty-ncurses.h | ||
tty-slang.c | ||
tty-slang.h | ||
tty.c | ||
tty.h | ||
win.c | ||
win.h | ||
x11conn.c | ||
x11conn.h |