×
Namespaces

Variants
Actions
Revision as of 11:50, 26 December 2008 by croozeus (Talk | contribs)

Archived:How to lock and unlock keypad using PySymbian

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia N95, Nokia E90
Compatibility
Platform(s): S60 1st Edition, S60 2nd Edition, S60 3rd Edition
Article
Keywords: misty, Pykeylock
Created: (27 Aug 2008)
Last edited: croozeus (26 Dec 2008)

Contents

Overview

The following code snippets are used to lock and unlock the keypad respectively using Python There are now two modules with the same functionalities : misty 1.93 and pykeylock. Please note that misty will work for 3rd edition phones only !


Locks the Keypad without showing a notification

import misty
import pykeylock
 
misty.lock_keypad_silent()
pykeylock.Lock()

Locks the Keypad and show a notification

import misty
import pykeylock
 
misty.lock_keypad()
pykeylock.Lock_WithNote()

Unlocks the Keypad without showing a notification

import misty
import pykeylock
 
misty.unlock_keypad_silent()
pykeylock.Unlock()

Unlocks the Keypad and show a notification

import misty
import pykeylock
 
misty.unlock_keypad()
pykeylock.Unlock_WithNote()

Code to test the Keypad locking status

import misty
import pykeylock
 
misty.unlock_keypad_silent()
print misty.keypad_locked() # 0
misty.lock_keypad_silent()
print misty.keypad_locked() # 1
 
pykeylock.Unlock()
print pykeylock.LockStatus() #0
pykeylock.Lock()
print pykeylock.LockStatus() #1
89 page views in the last 30 days.