Re: [xwax-devel] [PATCH] keyboard input: use character translation from SDL, not our own. Fixes non
Brought to you by:
hills
From: Yves A. <yve...@go...> - 2009-09-23 08:37:40
|
Hi Matěj, just tested your patch - you should check for control characters (try to search for the ENTER key). I attached a little quick'n'dirty patch for that. It would be nice to change all xwax input to Unicode some time (Except the modifiers?), but this needs some thought as its clearly not trivial. Maybe we could work together, start with the keyboard input and once we sorted that out we could see how we can change the library to use Unicode. Maybe we could have a chat about that on IRC? Greetings, Yves Matěj Laitl wrote: > Hi, > as a non-english speaker I use national keyboard layout. This prevented me from > typing numbers into search line, as those keys are only accessed with shift. > SDL docs explicitly say: "Note : A lot of the keysyms are unavailable on most > keyboards. For example, the SDLK_1 keysym can't be accessed on a French > keyboard. You get the SDLK_AMPERSAND instead..." [1] > > So I developed following patch, which should fix this once for all. ;-) It > should bring just small overhead on each key press. I also removed some > trailing whitespace, tell me if it's inconvenient for you. > > The patch is against xwax v0.6-8-g30fcdf1 + protect-search-buffer-from-overflow.patch > (mentioned patch was not yet published in your public git repo) > > Cheers, > Matej > > [1] http://www.libsdl.org/cgi/docwiki.cgi/SDLKey > > --- > This patch adds call to SDL_EnableUNICODE(1) after SDL initialisation, which > allows as to use translated unicode value from key press events. This value is > then used in search line input instead of our own keycode to ASCII translation. > > This will ease input of internationalised characters in future. > --- |