The standard navigation or arrow keys are used for CustomItem
internal
and external focus traversal (between Form
items).
Devices with a user interface style that supports only two-way
navigation support TRAVERSE_VERTICAL
interaction mode
but not TRAVERSE_HORIZONTAL
.
Four-way devices support both TRAVERSE_VERTICAL
and TRAVERSE_HORIZONTAL
modes.
S60 devices also support KEY_PRESS
, KEY_RELEASE
,
and KEY_REPEAT
interaction modes.
In general, the keys that are visible in Canvas
to
MIDP applications are also visible in CustomItem
. The
two exceptions in this are the navigation keys, which are used for CustomItem
internal
and external focus traversal, and a possible Selection key that is used for
activating the Item
default Command
.
These keys are not visible as low-level key events.
A Form
containing a CustomItem
object
is set current Displayable
and CustomItem
's
content remains blank although it should be visible.
This issue can be avoided if Display.getDisplay
is
called at least once during the MIDlet's lifecycle before creating the CustomItem
,
for example at the beginning of the MIDlet's constructor.
Note: CustomItem
does not get low-level key events even
if there is no CommandListener
. The command mapping is
the same as in any Form
Item
. However,
for backward compatibility to S60 releases prior to 3.2, it is possible to
enable low-level key event triggering from Selection key in CustomItem
.
If this feature is enabled, no Command
s will be mapped
to Selection key. Instead the relevant low-level key event will be triggered.
To enable this feature the following attribute should be added to the JAD
or manifest file of the Java application with value true: Nokia-MIDlet-S60-Selection-Key-Compatibility
.
For more information, see section JAD
and JAR manifest attributes.