Namespaces
Variants
Actions

Check whether keyboard backlight is on

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 07:57.
103 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