Command

If a CommandListener method does not return or is not delayed, the system may be blocked. Therefore, the CommandListener method should return immediately.

Labeling Commands

Application specified Command labels are used:

  • as a label in the softkey to which the Command was mapped (in case where only one Command is mapped to a specific softkey) or

  • as a label in the Options or context sensitive menu item (in case where more than one Command is mapped to a softkey) or

In S60 3rd Edition FP 2 onwards, the Selection key has a label describing the function attached to it:

  • If the Selection key executes a Command, the short label of the Command is shown as the Selection key label.

  • If the Selection key opens a context sensitive menu, a menu icon is shown as the Selection key label.

  • If the Selection key does the same operation as left softkey, a platform provided dot icon is shown as the Selection key label.

The Selection key labeling functionality is available only in the portrait mode. The Selection key functions normally both in portrait and in landscape modes, but in landscape mode the label cannot be shown due to space restrictions.

Table 43: Default Command properties

Command Type

Default Placement

Default Command label

STOP

Right softkey

Stop

OK

Selection key

Ok

CANCEL

Right softkey

Cancel

ITEM

Selection key

Select

SCREEN

Selection key

Select

HELP

Selection key

Help

BACK

Right softkey

Back

EXIT

Right softkey

Exit

Dynamic command addition or removal

If a Command is added or removed after the Commands for a displayable have been presented to the user, all the Commands are mapped again based on the rules presented in the previous sections. This may update the softkeys and Command list items even when they are visible.

Form, addition / removal of Commands may be performed by both the implementation and the MIDlet, as the user traverses different Items, since each Item may have its own specific Commands. This may result in scenarios where sometimes a particular Command is displayed on the left softkey, while at other times "Options" is displayed.

If another Displayable appears over the Options list while it is open (by a system application or by the MIDlet itself), then upon that Displayable’s removal the user will not be returned to the options list.