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.
Capturing the End (red) key during a call using Symbian C++
Capturing the End (red) key during a call
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 <W32STD.H> // link against ws32.lib
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 );
This solution has been tested using Nokia N73 (SW: 2.0620.0.05).