4

We have a midlet that needs to allow the user to switch input languages on the fly (its a dictionary type app) between several languages (say English to Arabic etc). All was charming in the "old days" with the numeric keypad, we handled the input ourselves matching 2 clicks on the 5 to feed the correct char to our program. Then came the E71 out, it has a qwerty keyboard and in our canvas KeyPressed we get the character the user pressed, say "a" on the keyboard, now the task of matching this to the correct language (say the user is now searching for the Arabic to English side of the dictionary) involves the task of matching "a" (on the qwerty layout I guess) to the arabic letter that would come out if the layout was arabic. There is a special keyboard shortcut in these S60 devices (varies between devices) that allows the user to pop the input language selector (function + space in the case of E71) but these does not seem to work when our midlet is running. another suggested solution was to somehow use an editable textfield for the input in which case a standard support for changing the input language is offered by the jvm, however we render a canvas (a nice looking one) and replacing this with a textfield is a last resort for us.

So, the question we have is what other solution can someone think of to tackle this issue? or if anyone found a way around this annoyance? best regards, --tzurs

gnat
  • 6,213
  • 108
  • 53
  • 73
Tzur
  • 180
  • 2
  • 12
  • you seem to know your domain pretty well already. Why can't you replicate the device native text input capabilities in a canvas? Or are you specifically looking for a solution that would be faster to implement? – michael aubert Sep 28 '09 at 17:31
  • you're right on the spot, i always like to get another person's view before I go ahead and spend a few hours doing something that seems very core, nothing complex here but still perhaps I've missed something obvious. – Tzur Sep 28 '09 at 22:08
  • AFAIK, most people who have faced this issue have reluctantly resorted to a GUI style break and used a Textbox or TextField. Feel free to share the code you end up writing if it works on more than one device and you are allowed. Have you checked what LWUIT does? – michael aubert Oct 05 '09 at 14:57
  • no I haven't looked at LWUIT yet, do you think they have a special trick? I don't fancy this framework so much, it seems to be very slow rendering. – Tzur Oct 21 '09 at 20:27
  • Just on the the same line though little different, How did you solve the issues with E71 such as E71 comes in QWERTY , QWERTZ layout? How do you find the current keyboard layout through J2ME – Azlam Nov 16 '09 at 19:51

1 Answers1

0

I think you can do the mapping using the Nokia specific system properties for keypad settings. Using com.nokia.keyboard.type, com.nokia.key.scancode and com.nokia.key.modifier you should be able to create a generic enough solution for Nokia devices.

More info on these system properties available on Nokia docs

Vimal
  • 1,266
  • 1
  • 9
  • 16
Gorkem Ercan
  • 3,220
  • 1
  • 18
  • 26