Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Xpress Media key Key Code in Symbian C++

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia 5800
Nokia 5230
Nokia X6
Platform(s): S60 5th Edition
S60 5th Edition
Keywords: EKeyApplication21
Created: User:Kbwiki (22 Sep 2010)
Last edited: hamishwillee (01 Aug 2012)


Key events from the Xpress Media key (the key in the top right corner of the screen) available on some touch devices can be captured using the RWindowGroup::CaptureKey() function. The corresponding key code for capturing the key event is EKeyApplication21, defined in the e32keys.h header file.

Note that capturing key events from the Xpress Media key will prevent the quick-launch menu from being displayed - therefore it's recommended that applications release the key by calling RWindowGroup::CancelCaptureKey() whenever they are switched to background or closed.

The SWEvent capability is required to use RWindowGroup::CaptureKey().

The Xpress Media key will only send key events of type EEventKey, not key up/down events.


Capturing events from the Xpress Media key:

  iKeyHandle = CEikonEnv::Static()->RootWin().CaptureKey( EKeyApplication21, 0, 0, 0);

iKeyHandle (a TInt32 value) is needed later when releasing (canceling) the key capture:

  CEikonEnv::Static()->RootWin().CancelCaptureKey( iKeyHandle );

See also

Archived:Handling Camera resource on Symbian

This page was last modified on 1 August 2012, at 04:41.
30 page views in the last 30 days.