diff options
Diffstat (limited to 'src/zoom.cpp')
-rw-r--r-- | src/zoom.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/zoom.cpp b/src/zoom.cpp index 84c303c..78e5389 100644 --- a/src/zoom.cpp +++ b/src/zoom.cpp @@ -26,6 +26,7 @@ #else #include <iostream> #include <X11/X.h> +#include <X11/XKBlib.h> #include <X11/extensions/XInput2.h> #include <GL/glx.h> #include <sys/time.h> @@ -390,7 +391,7 @@ int main() { break; case KeyPress: - switch(XKeycodeToKeysym(disp, event.xkey.keycode, 0)) { + switch(XkbKeycodeToKeysym(disp, event.xkey.keycode, 0, 0)) { case XK_Up: case XK_w: input |= Zoom::Game::FORWARD; break; case XK_Down: case XK_s: input |= Zoom::Game::BACKWARD; break; case XK_Left: case XK_a: input |= Zoom::Game::LEFT; break; @@ -400,7 +401,7 @@ int main() { break; case KeyRelease: - switch(XKeycodeToKeysym(disp, event.xkey.keycode, 0)) { + switch(XkbKeycodeToKeysym(disp, event.xkey.keycode, 0, 0)) { case XK_Up: case XK_w: input &= ~Zoom::Game::FORWARD; break; case XK_Down: case XK_s: input &= ~Zoom::Game::BACKWARD; break; case XK_Left: case XK_a: input &= ~Zoom::Game::LEFT; break; |