summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-01-13 08:25:21 +0100
committerwm4 <wm4@mplayer2.org>2012-01-18 04:13:27 +0100
commit10ab86b73df2665ffc971699efd038964b10a794 (patch)
tree91e449d04ec91b254b29894f97f58b51ce76dbd7
parente72296758074d8e375490025b0cbe7f333230f13 (diff)
downloadmpv-10ab86b73df2665ffc971699efd038964b10a794.tar.bz2
mpv-10ab86b73df2665ffc971699efd038964b10a794.tar.xz
x11: add KP_Separator to key mapping
At least on some keyboards, the key between '0' and 'Enter' on the key pad is mapped to KP_Separator. Since X11 VOs accept unicode input, the mplayer keycode this key generates depended on the numlock state, and with numlock enabled this mapped to an ASCII character. This is probably not what the user wanted, since two physical keys will always map to the same key code. Map it to KP_DEC.
-rw-r--r--libvo/wskeys.h1
-rw-r--r--libvo/x11_common.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/libvo/wskeys.h b/libvo/wskeys.h
index a236a9fd55..2f9523f2d1 100644
--- a/libvo/wskeys.h
+++ b/libvo/wskeys.h
@@ -56,6 +56,7 @@
#define wsEscape 0xff1b
#define wsGrayEnter 0xff8d
#define wsGrayPlus 0xffab
+#define wsGraySeparator 0xffac
#define wsGrayMinus 0xffad
#define wsGrayMul 0xffaa
#define wsGrayDiv 0xffaf
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 3f55fa2f93..c5a09e4bba 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -564,6 +564,7 @@ static const struct mp_keymap keymap[] = {
{wsGray3, KEY_KP3}, {wsGray4, KEY_KP4}, {wsGray5, KEY_KP5},
{wsGray6, KEY_KP6}, {wsGray7, KEY_KP7}, {wsGray8, KEY_KP8},
{wsGray9, KEY_KP9}, {wsGrayDecimal, KEY_KPDEC},
+ {wsGraySeparator, KEY_KPDEC},
// numpad without numlock
{wsGrayInsert, KEY_KPINS}, {wsGrayEnd, KEY_KP1}, {wsGrayDown, KEY_KP2},