×
Namespaces

Variants
Actions

Xpress Media key Key Code in Symbian C++

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


Description

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.

Solution

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 07:41.
56 page views in the last 30 days.
×