case KeyPress:
case KeyRelease:
{
- KeySym keysym = XKeycodeToKeysym(window.get_display().get_private().display, event.xevent.xkey.keycode, 0);
+ KeySym keysym = XLookupKeysym(const_cast<XKeyEvent *>(&event.xevent.xkey), 0);
if(keysym!=NoSymbol)
if(unsigned key = key_from_sys(keysym))
set_button_state(key, event.xevent.type==KeyPress, true);