×
Namespaces

Variants
Actions

Handling Send key events in Phonebook Extension Plug-in

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

Overview

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.

Was this page helpful?

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

 

Thank you!

We appreciate your feedback.

×