applied James Turner's XkbKeycodeToKeysym patch, thanks

keyboard
anselm@garbe.us 13 years ago
parent 20f6917910
commit 606b44179d
  1. 3
      dwm.c

@ -36,6 +36,7 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xproto.h> #include <X11/Xproto.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/XKBlib.h>
#ifdef XINERAMA #ifdef XINERAMA
#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xinerama.h>
#endif /* XINERAMA */ #endif /* XINERAMA */
@ -1085,7 +1086,7 @@ keypress(XEvent *e) {
XKeyEvent *ev; XKeyEvent *ev;
ev = &e->xkey; ev = &e->xkey;
keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); keysym = XkbKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0, 0);
for(i = 0; i < LENGTH(keys); i++) for(i = 0; i < LENGTH(keys); i++)
if(keysym == keys[i].keysym if(keysym == keys[i].keysym
&& CLEANMASK(keys[i].mod) == CLEANMASK(ev->state) && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)

Loading…
Cancel
Save