diff --git a/server/internal/xorg/xorg.c b/server/internal/xorg/xorg.c index b076f47..885dbd4 100644 --- a/server/internal/xorg/xorg.c +++ b/server/internal/xorg/xorg.c @@ -130,40 +130,21 @@ int XKey(unsigned long key, int down) { Display *display = getXDisplay(); KeyCode code = -2; - if (down) { - code = XkbKeysymToKeycode(key); - if (!code) { - int min, max, numcodes; - XDisplayKeycodes(display, &min, &max); - XGetKeyboardMapping(display, min, max-min, &numcodes); + code = XkbKeysymToKeycode(key); + if (!code) { + int min, max, numcodes; + XDisplayKeycodes(display, &min, &max); + XGetKeyboardMapping(display, min, max-min, &numcodes); - code = (max-min+1)*numcodes; - KeySym keysym_list[numcodes]; - for(int i=0;i