Namespaces

Variants
Actions

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 over the next few weeks. Thanks for all your past and future contributions.

Check whether keyboard backlight is on

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): N78
Compatibility
Platform(s): S60 3rd,3rd FP1,3rd Fp2
Platform Security
Capabilities: )
Article
Keywords: keywords=HAL::Get(),User::ResetInactivityTime()
Created: lming (21 Nov 2008)
Last edited: hamishwillee (08 Feb 2012)

Overview

This snippet demonstrates how to check whether the keyboard backlight is off and how to turn it on. This snippet can be self-signed.

Source file

//necessary library
LIBRARY HAL.LIB
LIBRARY euser.lib
//necessary header file
#include <HAL.h>
#include <hal_data.h>
#include <e32std.h>
 
TBool keyboardBacklightState;
//retrieve EKeyboardBacklightStatevalue
HAL::Get( HALData::EKeyboardBacklightState, keyboardBacklightState);
if(keyboardBacklightState)
{
//keyboard backlight is ON now.
.......
}
else
{
//keyboard backlight is Off now.
//ResetInactivityTime will reset all user inactivity timers and backlight
//will be turn on
User::ResetInactivityTime()
}

Postconditions

The keyboard backlight will be turned on. Notice that User::ResetInactivityTime also makes the screen backlight to be turned on.

This page was last modified on 8 February 2012, at 04:57.
27 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.

×