diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-07-29 08:46:50 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-29 08:46:50 +0300 |
commit | 85f0577cd9f520ccae29a0b85b4976df3b27db39 (patch) | |
tree | 5a9d697e81b07f233693901c8e8515332c29af4b /libvo/x11_common.c | |
parent | ad48f8038cf3aa6392912ba65fede7cf71250001 (diff) | |
download | mpv-85f0577cd9f520ccae29a0b85b4976df3b27db39.tar.bz2 mpv-85f0577cd9f520ccae29a0b85b4976df3b27db39.tar.xz |
vo: X key input: remove ambiguous KeySym remapping
Code mapping X keyboard events to internal player key names remapped
the incoming KeySym values in a way that only kept information about
the lowest byte of the value and whether or not the value was below
256. This caused collisions between values. Remove this obviously
broken mapping and use the raw KeySym values instead. I'm not familiar
enough with X key handling to tell whether there was any valid
motivation whatsoever for the mapping, but the implementation was
certainly broken; if something else breaks it'll have to be fixed
later.
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 0ad2a30dd9..1b7636bba8 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -809,8 +809,6 @@ int vo_x11_check_events(struct vo *vo) break; case KeyPress: { - int key; - XLookupString(&Event.xkey, buf, sizeof(buf), &keySym, &x11->compose_status); int modifiers = 0; @@ -825,10 +823,7 @@ int vo_x11_check_events(struct vo *vo) #ifdef XF86XK_AudioPause vo_x11_putkey_ext(vo, keySym, modifiers); #endif - key = - ((keySym & 0xff00) != - 0 ? ((keySym & 0x00ff) + 256) : (keySym)); - vo_x11_putkey(vo, key, modifiers); + vo_x11_putkey(vo, keySym, modifiers); ret |= VO_EVENT_KEYPRESS; } break; |