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.

Archived:Querying Keypad status using GetIndicatorPayload() does not work with custom screensaver (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): All S60 2nd Edition, S60 3rd Edition (initial release) and FP1 devices
Created: User:Technical writer 1 (22 Feb 2008)
Last edited: hamishwillee (19 Jun 2012)



MScreensaverPluginHost::GetIndicatorPayload(TScreensaverIndicatorIndex aIndex, TIndicatorPayload & aResult); with EScreensaverIndicatorIndexKeyGuardState as the first parameter always returns a non-zero value irrespective of the keypad status.


To create a customized screensaver, MScreensaverPluginHost::GetIndicatorPayload() needs to be used to query the status of Keypad, missed calls, new messages, active profile, etc. Using this API for querying the keypad status does not work in any of the S60 2nd Edition, S60 3rd Edition, and S60 3rd Edition, FP1 devices.

How to reproduce

 TIndicatorPayload result;
TInt status = MScreensaverPluginHost::GetIndicatorPayload (
EScreensaverIndicatorIndexKeyGuardState, result );
// If result is other than '0', keylock is activated
if (status == KErrNone && result.iInteger != 0)
// Draw key symbol


A workaround is to query the keylock status with the RAknKeyLock method.

 RAknKeyLock keyLock;
if (keyLock.Connect() == KErrNone)
TBool locked = keyLock.IsKeyLockEnabled();
if (locked)
// Draw key symbol
This page was last modified on 19 June 2012, at 08:00.
48 page views in the last 30 days.