Hi,
I’m trying to use the new experimental KMS/DRM backend on a Debian/Linux system with i915 graphics.
So far I managed to get some graphics on the screen but I was not able to get keyboard events.
When I start my pllication, the keyboard becomes completely unresponsive, not even the caps-lock or num-lock lights are working. When I kill my program (via ssh), the keyboard stays in this state.
To demonstrate the problem I’ve written a small test program:
#include "SDL.h" #include int main(int argc, char* argv[]) { SDL_Window *window; SDL_Init(SDL_INIT_VIDEO); window = SDL_CreateWindow("An SDL2 window", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1920, 1080, SDL_WINDOW_OPENGL|SDL_WINDOW_FULLSCREEN); if (window == NULL) { printf("Could not create window: %s\n", SDL_GetError()); return 1; } /* try if we get some events */ for (int i=0; i<100; ++i) { SDL_Event event; printf("wait event\n"); SDL_WaitEvent(&event); printf("got event 0x%x\n", event.type); } SDL_DestroyWindow(window); SDL_Quit(); return 0; }
When I execute the compiled code I get:
wait event got event 0x200 wait event got event 0x200 wait event got event 0x200 wait event got event 0x200 wait even
and then it stops and doesn’t react to any key press.
Is this not working because the code is still experimental? (Using latest development version of SDL via mercurial).
Any ideas what I can try to get keyboard events and/or how to debug this?
Best regards,
-Rainer