summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-02-05 02:16:17 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-02-05 02:16:17 +0200
commit1f1ef44dd15f1e45d13489f96886cfd5f0c57aa3 (patch)
tree7d6dfa222f067b5607941b6c7960bf72c901daed /input
parent7f576e8b6633571ed9eb8fa9106cb06592b7470c (diff)
downloadmpv-1f1ef44dd15f1e45d13489f96886cfd5f0c57aa3.tar.bz2
mpv-1f1ef44dd15f1e45d13489f96886cfd5f0c57aa3.tar.xz
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.
Diffstat (limited to 'input')
-rw-r--r--input/input.c3
1 files changed, 2 insertions, 1 deletions
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) {