Namespaces
Variants
Actions

Handling Send key events in Phonebook Extension Plug-in

Jump to: navigation, search
Article Metadata

Tested with
Devices(s): Nokia N97

Compatibility
Platform(s): 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 04:08.
118 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved