mirror of https://github.com/mpv-player/mpv
input: accept Shift modifier for Enter and Tab keys
Enter and Tab are the only named keys (rather than identified by the printable character they produce) with code below 256. Add a special case to recognize the Shift modifier with them.
This commit is contained in:
parent
7f576e8b66
commit
1f1ef44dd1
|
@ -1121,7 +1121,8 @@ static mp_cmd_t* interpret_key(struct input_ctx *ictx, int code)
|
|||
* we want to have "a" and "A" instead of "a" and "Shift+A"; but a separate
|
||||
* shift modifier is still kept for special keys like arrow keys.
|
||||
*/
|
||||
if ((code & ~KEY_MODIFIER_MASK) < 256)
|
||||
int unmod = code & ~KEY_MODIFIER_MASK;
|
||||
if (unmod < 256 && unmod != KEY_ENTER && unmod != KEY_TAB)
|
||||
code &= ~KEY_MODIFIER_SHIFT;
|
||||
|
||||
if(mp_input_key_cb) {
|
||||
|
|
Loading…
Reference in New Issue