Media keys in S60 devices are play/pause, stop, previous/rewind, and next/fast forward.
Media keys feature has been implemented so that MIDlets do not get media
key events by default. If MIDlet wants to be notified by media key events, Nokia-UI-Enhancement JAD
attribute must be defined by value MusicKeysSupported,
as described in table Nokia
proprietary JAD attributes.
Media key events are delivered to all Canvas and CustomItem objects
even are not the current Displayable or focused item
on the Form. This enables application to get notifications
about media key presses even if the application is running in the background.
The idea behind this feature is that Java media applications could be managed
without setting the application on the foreground. This improves usability
of media application especially when the application is managed via accessory
and the device is not at hand.
If the MIDlet contains more than one active Canvas or CustomItem objects,
it is MIDlet developer’s responsibility to manage what Canvas or CustomItem object(s)
(if any) handles media key events, because all these objects will get a media
key event when it occurs.
For key codes of media keys, see table Additional physical keys.