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 over the next few weeks. Thanks for all your past and future contributions.
Xpress Media key Key Code in Symbian C++
S60 5th Edition
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 );