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. Thanks for all your past and future contributions.

Handling Send key events in Phonebook Extension Plug-in

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia N97
Platform(s): S60 5th Edition
S60 5th Edition
Created: User:Kbwiki (23 Mar 2010)
Last edited: hamishwillee (02 Aug 2012)


In S60 5th Edition applications, by default the dial pad can be launched by pressing the green key (also called the Yes key), and voice command can be started by long pressing the green key. These functionalities can be disabled as described in How to prevent dial pad and voice command from being started by green key.

However, the above method cannot be used with the Phonebook Extension Plug-in. An alternate way to achieve this result is described here.

In the extension plug-in control's OfferKeyEventL method,add the following lines of code:

 TKeyResponse OfferKeyEventL(const TKeyEvent&  aKeyEvent,TEventCode aType)
TKeyResponse ret = EKeyWasNotConsumed;
// Check if this is a Send Key press both short & long
if (aKeyEvent.iScanCode == EStdKeyYes)
ret = EKeyWasConsumed;
return ret;
// rest of the code
This page was last modified on 2 August 2012, at 01:08.
31 page views in the last 30 days.