How to detect Nokia special keys in Canvas mode
Article Metadata
Every Java ME phone has standard and game keys that are implemented as constants in every phone, so you can compare them in the keyPressed method of the Canvas class.
But, there are more keys that you can capture if you are using a Nokia phone, using the Nokia UI API and FullCanvas. In this class, you have access to these new constants that can be used as the MIDP ones:
- KEY_DOWN_ARROW
- KEY_UP_ARROW
- KEY_RIGHT_ARROW
- KEY_LEFT_ARROW
- KEY_SEND
- KEY_END
- KEY_SOFTKEY1
- KEY_SOFTKEY2
- KEY_SOFTKEY3


Level :Basic
This article focuses on Nokia UI API and fullCanvas Class. Article differentiate among standard j2me mobile and Nokia Mobile as it has some special keys which we can handle using j2me. Using keyPressed Method of Canvas class we can compare it with user generated events.
Every Java ME phone has standard and game keys that are implemented as constants in every phone, so you can compare them in the key Pressed method of the Canvas class. These keys are KEY_RIGHT_ARROW,KEY_LEFT_ARROW,KEY_SEND,KEY_END,KEY_SOFTKEY1,KEY_SOFTKEY2,KEY_SOFTKEY3 KEY_DOWN_ARROW,KEY_UP_ARROW etc.
This article has got very new information that is very hard to find else where. The Explanation and Purpose is good to understand.
--kalki 12:29, 29 September 2009 (UTC)