|
Replies:
2
-
Last Post:
Nov 21, 2008 2:58 AM
by: klemensz
|
|
|
|
|
|
|
TextField default key codes / mapping
Posted:
Nov 20, 2008 4:47 AM
|
|
|
Hi,
Is there a way to override the mapping of key codes to characters/numbers, for example if I want to have German characters available as well? Looking at the source code I saw that DEFAULT_KEY_CODES is not accessible from outside the class or a subclass. Is there a special reason for that?
I see a possibility to accomplish what I need by overwriting the default input modes with my own input modes using addInputMode(). Is this the "correct" way? It might be easier if there was a getter for DEFAULT_KEY_CODES.
Thanks!
|
|
|
|
|
|
|
Re: TextField default key codes / mapping
Posted:
Nov 20, 2008 10:26 AM
in response to: klemensz
|
|
|
|
|
Hi, there was an i18n post for text field in this list but I can't seem to find it... Anyway you never need to change the code of text field, use addInputMode(...) and related methods to do what you need.
> Hi, > > Is there a way to override the mapping of key codes to characters/ > numbers, for example if I want to have German characters available > as well? Looking at the source code I saw that DEFAULT_KEY_CODES is > not accessible from outside the class or a subclass. Is there a > special reason for that? > > I see a possibility to accomplish what I need by overwriting the > default input modes with my own input modes using addInputMode(). > Is this the "correct" way? It might be easier if there was a getter > for DEFAULT_KEY_CODES. > > Thanks! > [Message sent by forum member 'klemensz' (klemensz)] > > http://forums.java.net/jive/thread.jspa?messageID=317840 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
Shai Almog http://lwuit.blogspot.com/
[att1.html]
|
|
|
|
|
|
|
|
Re: TextField default key codes / mapping
Posted:
Nov 21, 2008 2:58 AM
in response to: Shai Almog
|
|
|
OK, I make my own Hashtables with the key mappings now and overwrite the default values with TextField.addInputMode("ABC", upcase, false); and TextField.addInputMode("abc", lowcase, false);
|
|
|
|
|