From 1f1ef44dd15f1e45d13489f96886cfd5f0c57aa3 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 5 Feb 2011 02:16:17 +0200 Subject: [PATCH] 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. --- input/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input/input.c b/input/input.c index 822a1e3b42..f201160e05 100644 --- a/input/input.c +++ b/input/input.c @@ -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) {