1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 12:55:16 +00:00

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:
Uoti Urpala 2011-02-05 02:16:17 +02:00
parent 7f576e8b66
commit 1f1ef44dd1

View File

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