mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 10:02:17 +00:00
input: fix "enter" on console
The commit "input: handle UTF-8 terminal input" accidentally messed up the handling of certain special keys. Apparently only KEY_ENTER was affected by this, because the code was valid UTF-8, but didn't directly map to the keycode.
This commit is contained in:
parent
7822eca9ac
commit
3b68a774b9
@ -202,7 +202,7 @@ void getch2(struct mp_fifo *fifo)
|
||||
len = 2;
|
||||
}
|
||||
code = KEY_ENTER;
|
||||
}
|
||||
} else {
|
||||
int utf8len = bstr_parse_utf8_code_length(code);
|
||||
if (utf8len > 0 && utf8len <= getch2_len) {
|
||||
struct bstr s = { getch2_buf, utf8len };
|
||||
@ -213,6 +213,7 @@ void getch2(struct mp_fifo *fifo)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (getch2_len > 1) {
|
||||
int c = getch2_buf[1];
|
||||
if (c == 27) {
|
||||
|
Loading…
Reference in New Issue
Block a user