Symbian Security Studio

About symbian software programming ,security analysis and other things about symbian.

Monday, October 1, 2007

Capturing the End (red) key during a call


Platform(s):

S60 3rd Edition

S60 3rd Edition, FP1

An application can capture the the End key even during an active call using the following kind of code.

Please note that SwEvent capability is needed to make successful calls to the mentioned Window Server functions.

#include // link against ws32.lib

#include

...

RWindowGroup& groupWin = CCoeEnv::Static()->RootWin();

TInt endKey1 = groupWin.CaptureKeyUpAndDowns( EStdKeyNo, 0, 0 );

TInt endKey2 = groupWin.CaptureKey( EKeyNo, 0, 0 );

// -> End key can now be processed before the phone application of the device...

...

// Cancel the capture

groupWin.CancelCaptureKeyUpAndDowns( endKey1 );

groupWin.CancelCaptureKey( endKey2 );

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home