How to utilize Communicators' application keys

From Nokia Developer Wiki
Jump to: navigation, search

Article Metadata
Tested with
Devices(s): Nokia 9500, Nokia 9300
Platform(s): Series 80 2nd Edition
Created: User:Technical writer 2 (25 Aug 2005)
Last edited: hamishwillee (14 Jun 2012)


How to utilize Communicators' application keys


Normally the application keys (Desk, My own, etc.) are consumed by the startup application, but by setting the capture priority equal to system applications, the system distributes key events also to your application. The following code shows how to capture the Desk key with RWindowGroup:
// This handle is used to cancel the capture later
TInt32 applicationKey;
// Priority to capture the application keys
TInt capturePriority(1000000);
// Get the root window
RWindowGroup& groupWin = iCoeEnv->RootWin();
applicationKey = groupWin.CaptureKey(EKeyApplication0, 0, 0, capturePriority);
Received key events can be handled in the OfferKeyEventL() function. Application keys range from EKeyApplication0 to EKeyApplication7, as defined in e32keys.h (TKeyCode).
Note: The functionality of application keys should not be changed without user intervention. If possible, the original function of an application key should be retained, and new functionality added, e.g., behind two key presses.

This page was last modified on 14 June 2012, at 09:28.
24 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.