views:

404

answers:

2

Hi,

Is there a way to check if the iphone keyboard is currently in Japanese vs English input mode?

I would just check the Unicode characters but the numpad on the Japanese keyboard sends regular ASCII characters I think...

A: 

There is not way to check what keyboard is being displayed, the best you can do is either display a alert to user telling him he must use japanesee keyboard or make your own keyboard and push that in there.

Daniel
thanks, just thought id check :).
kiyoshi
+2  A: 

If you dive into the private API you can determine the currently active input manager:

NSLog(@"Active Input Manager: %@", [[objc_getClass("UIKeyboardInputManager") activeInstance] class]);
rpetrich
Thanks :), that's pretty cool. I think I'm going to stay away from private API stuff for my application though, for fear of rejection. Out of curiosity, is there documentation for the private API?
kiyoshi
In general, Apple can't detect most private API calls (including the one above); as long as your app fails gracefully it should be fine.There's no documentation for most of the private API, but you can generate the headers using class-dump: http://code.google.com/p/networkpx/wiki/class_dump_z
rpetrich