sdl@lists.libsdl.org
[Top] [All Lists]

Re: [SDL] My thoughts on keyboard input in SDL 1.3

Subject: Re: [SDL] My thoughts on keyboard input in SDL 1.3
From: Christian Walther
Date: Fri, 25 Jan 2008 21:13:58 +0100
Bob Pendleton wrote:
> One more issue with what I outlined, does 
> 
> SDL_GetLayoutKey(SDLK_KP_1) == SDLK_KP_1
> 
> or does
> 
> SDL_GetLayoutKey(SDLK_KP_1) == the Unicode code point for "1"?
> 
> I like the first one because it gives me it means that 
> 
> SDL_GetKeyName() SDL_GetLayoutKey(SDLK_KP_1)) == "[1]"

I like the second one because the first one makes it impossible to have

   SDL_GetKeyName(SDL_GetLayoutKey(SDLK_KP_1)) == "[Ù]" (or "Ù" or "KP 
Ù" or whatever)

in an Arabic layout (unless we introduce a layout dependency into 
SDL_GetKeyName() as well). (And to still achieve the distinguishability 
between SDL_GetLayoutKey(SDLK_1) and SDL_GetLayoutKey(SDLK_KP_1) I need 
the magic keypad bit.)

However, I don't actually have an Arabic keyboard, so don't take me too 
seriously about this. It may be that the keypad keys are labeled with 
both Arabic and Latin numerals, so that having SDL_GetKeyName() return 
Latin ones wouldn't be completely wrong. All I know is that they do type 
Arabic numerals here on Mac OS X.

  -Christian

_______________________________________________
SDL mailing list
SDL@xxxxxxxxxxxxxxxx
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
<Prev in Thread] Current Thread [Next in Thread>