Keyboard errors and incompleteness with iPad keyboards

Here are some errors/incompleteness I’ve noticed with SDL support for iPad keyboards.

SDL_KEYDOWN event is never sent until SDL_KEYUP is also sent.

There is no event for hiding the keyboard, docking or undocking the keyboard, or splitting or unsplitting the keyboard.

There is no way to query whether the keyboard is docked or undocked, or split or unsplit. There is no way to query where the keyboard is while undocked, or how large the keyboard is, or if it is alphanumeric or any of the other keyboard layouts.

There is no way to change the keyboard layout to another style (such as alphanumeric).

When the shift key is pressed, the iPad should interpret the next key hit as an uppercase letter. Or when the shift key is double-tapped, all letter keys pressed should be interpreted as upper case letters. However, in both cases, SDL_GetModState never returns anything to reflect that a shift is active. On a physical keyboard, the shift key is essentially down simultaneously as the letter key, but on the iPad, the shift key is pressed and released before the letter key is actually pressed. Therefore, SDL_GetModState doesn’t reflect shift states properly on iOS.

If you hide the keyboard with the button on the bottom right of the keypad, SDL_iPhoneKeyboardIsShown still returns true even though the keyboard is not shown.

I didn’t expect SDL to fully support all of the very operating system specific functions, and that isn’t so much of a problem since that stuff can be done with non-SDL functions. What is more of a problem is something like the SDL_iPhoneKeyboardIsShown and SDL_GetModState returning misleading/wrong information. I’m going to see if I can augment the current IOS keyboard related functionality. If anyone has already done something like that, I’d be interested in any information you’ve figured out already.

I haven’t played with them much, but those seem like great improvements.
Let me know when you have a patch for SDL.

Thanks!On Mon, Oct 1, 2012 at 2:33 PM, Trev wrote:

**
Here are some errors/incompleteness I’ve noticed with SDL support for iPad
keyboards.

SDL_KEYDOWN event is never sent until SDL_KEYUP is also sent.

There is no event for hiding the keyboard, docking or undocking the
keyboard, or splitting or unsplitting the keyboard.

There is no way to query whether the keyboard is docked or undocked, or
split or unsplit. There is no way to query where the keyboard is while
undocked, or how large the keyboard is, or if it is alphanumeric or any of
the other keyboard layouts.

There is no way to change the keyboard layout to another style (such as
alphanumeric).

When the shift key is pressed, the iPad should interpret the next key hit
as an uppercase letter. Or when the shift key is double-tapped, all letter
keys pressed should be interpreted as upper case letters. However, in both
cases, SDL_GetModState never returns anything to reflect that a shift is
active. On a physical keyboard, the shift key is essentially down
simultaneously as the letter key, but on the iPad, the shift key is pressed
and released before the letter key is actually pressed. Therefore,
SDL_GetModState doesn’t reflect shift states properly on iOS.

If you hide the keyboard with the button on the bottom right of the
keypad, SDL_iPhoneKeyboardIsShown still returns true even though the
keyboard is not shown.

I didn’t expect SDL to fully support all of the very operating system
specific functions, and that isn’t so much of a problem since that stuff
can be done with non-SDL functions. What is more of a problem is something
like the SDL_iPhoneKeyboardIsShown and SDL_GetModState returning
misleading/wrong information. I’m going to see if I can augment the current
IOS keyboard related functionality. If anyone has already done something
like that, I’d be interested in any information you’ve figured out already.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org