Namespaces

Variants
Actions

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.

Revision as of 09:05, 8 February 2010 by Forum Nokia KB (Talk | contribs)

Archived:Capturing Send and End key events fails on S60 3rd Edition FP2 (Known Issue)

From Wiki
Jump to: navigation, search


Template:KBKI

Article Metadata
Tested with
Devices(s): Tested on Nokia N96
Compatibility
Platform(s): S60 3rd Edition, FP2
S60 3rd Edition FP2
Article
Keywords: CaptureKey, CaptureKeyUpAndDowns
Created: (08 Feb 2010)
Last edited: Forum Nokia KB (08 Feb 2010)

Description

Capturing events from a long press of the End (red) key on S60 devices can be done using the following code snippet:

 // Capture events from end key
CCoeEnv::Static()->RootWin().CaptureKey( EKeyPhoneEnd, 0, 0 ) ;
CCoeEnv::Static()->RootWin().CaptureKeyUpAndDowns( EStdKeyNo, 0, 0 );

This code snippet works fine on S60 3rd Edition and 3rd Edition, FP1 devices. However, on S60 3rd Edition, FP2 devices, capturing the events will fail if the priority is not defined or is too low.


Solution

For the above functions, use overloaded versions that take priority as parameter:

 TInt32 CaptureKey( TUint aKeycode, TUint aModifierMask, 
TUint aModifier, TInt aPriority );
 
TInt32 CaptureKeyUpAndDowns( TUint aScanCode, TUint aModifierMask,
TUint aModifier, TInt aPriority );


For S60 3rd Edition, FP2 devices, capturing events from the Send/End keys is possible by using a priority value higher than EPriorityFileServer.


Required capabilities: SwEvent

444 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×