aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--events.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/events.c b/events.c
index fbd6706..41a1d0a 100644
--- a/events.c
+++ b/events.c
@@ -45,13 +45,11 @@ void event_loop(app_t *app) {
void on_keypress(app_t *app, XEvent *ev) {
KeySym keysym;
- XKeyEvent *kev;
if (!app || !ev)
return;
- kev = &ev->xkey;
- keysym = XKeycodeToKeysym(app->win.env.dpy, (KeyCode) kev->keycode, 0);
+ keysym = XLookupKeysym(&ev->xkey, 0);
switch (keysym) {
case XK_Escape: