Alex Baines 2020-03-13 23:03:43 +00:00
parent 8f1c989024
commit f6a1d64a2f
1 changed files with 6 additions and 2 deletions

View File

@ -1000,9 +1000,13 @@ linux_x11_init(int argc, char** argv, Plat_Settings* settings) {
}
XkbSelectEvents(linuxvars.dpy, XkbUseCoreKbd, XkbAllEventsMask, XkbAllEventsMask);
linuxvars.xkb = XkbGetKeyboard(linuxvars.dpy, XkbAllComponentsMask, XkbUseCoreKbd);
linuxvars.xkb = XkbGetMap(linuxvars.dpy, XkbKeyTypesMask | XkbKeySymsMask, XkbUseCoreKbd);
if(!linuxvars.xkb) {
system_error_box("Error getting XKB keyboard details.");
system_error_box("Error getting XKB keyboard map.");
}
if(XkbGetNames(linuxvars.dpy, XkbKeyNamesMask, linuxvars.xkb) != Success) {
system_error_box("Error getting XKB key names.");
}
// closer to windows behaviour (holding key doesn't generate release events)