×
Namespaces

Variants
Actions
Revision as of 05:19, 8 August 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Capturing the End (red) key during a call using Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Compatibility
Platform(s): S60 3rd Edition (initial release) and FP1
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 2 (07 Jul 2006)
Last edited: hamishwillee (08 Aug 2012)

Overview

Capturing the End (red) key during a call

Description

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
#include <e32keys.h>
...
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).

This page was last modified on 8 August 2012, at 05:19.
81 page views in the last 30 days.
×