Skip to contentSkip to conversation

SDL: Fix dead keys

PATCH New Samuel Thibault 1 participant 1 message Apr 12, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SDL: Fix dead keys

Hello,

On a lot of keyboards (e.g. french, finnish, ...), there are dead keys, i.e. they don't output text alone. Qemu's sdl.c always enable unicode mode, so that these keys don't actually produce a keycode, and the result is that these keys don't work at all in the guest. The attached patch fixes that by enabling/disabling unicode mode as needed.

Samuel

sdl.c +1 -1
Index: sdl.c
===================================================================
@@ -352,6 +352,7 @@
     }
 
     vga_hw_update();
+    SDL_EnableUNICODE(!is_graphic_console());
 
     while (SDL_PollEvent(ev)) {
         switch (ev->type) {
@@ -640,7 +641,6 @@
     sdl_resize(ds, 640, 400);
     sdl_update_caption();
     SDL_EnableKeyRepeat(250, 50);
-    SDL_EnableUNICODE(1);
     gui_grab = 0;
 
     sdl_cursor_hidden = SDL_CreateCursor(&data, &data, 8, 1, 0, 0);