| Reply | « Previous Thread | Next Thread » |
|
Hi,
How can I enable/disable right soft key ? Btw,I am working with S60 3edition FP1 and using N95 8GB Thanks&Regards |
| soontobeared |
| View Public Profile |
| Find all posts by soontobeared |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
what do you exactly mean by enabling or disabling the right soft key?? Regards Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Hi gaba,
In my application, clicking the right soft key('Exit') gives a popup menu which has a 'Hide' option.Clicking the 'Hide' hides my application and lets it run in the background. Initially i don't want to provide this hiding capability to the user and would like to make it available at a later point of time. So I am thinking about locking the right soft key initially so that the user can't access the 'Hide' option and unlock it when I like to. How can I achieve this? Btw, by locking/disabling, I mean that nothing should happen on clicking the button(no event to be triggered). Thanks&Regards.
Last edited by soontobeared : 2009-03-08 at 09:17.
Reason: Added Something
|
| soontobeared |
| View Public Profile |
| Find all posts by soontobeared |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
Hi,
One way to do it is to detect when the right softkey is pressed and do nothing using the keycapture module. Then when you need the softkey again, just stop the capturer. See the keycapture section in the PyS60 Library Reference. Code:
import keycapture from key_codes import * def cb_capture(key): if key == EKeyRightSoftkey: pass capturer = keycapture.KeyCapturer(cb_capture) capturer.keys = (EKeyRightSoftkey) capturer.start() |
|
Quote:
|
|
Code:
import keycapture from key_codes import * def cb_capture(key): if key == EKeyRightSoftkey: pass capturer = keycapture.KeyCapturer(cb_capture) capturer.keys = (EKeyRightSoftkey,) capturer.start() |
|
Hi Anime and Bogdan,
THanks for the reply. Please help me debug this code. Code:
def __init__(self):
capturer = keycapture.KeyCapturer(self.cb_capture)
capturer.keys = (EKeyRightSoftkey,)
capturer.start()
def cb_capture(self,key):
if key == EKeyRightSoftkey:
pass
Btw, I am a python noob ![]() Thanks&Regards
Last edited by soontobeared : 2009-03-09 at 08:43.
|
| soontobeared |
| View Public Profile |
| Find all posts by soontobeared |
|
Hi,
I fixed it. Thanks |
| soontobeared |
| View Public Profile |
| Find all posts by soontobeared |
|
capture.keys is a list.can read and write .
use capture.keys.append(EKeyRightSoft) instead capture.keys=(EKeyRightSoft) |
| psychologe |
| View Public Profile |
| Find all posts by psychologe |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Problem with Skin enabling - disabling and Setting List in S60 | sauvikds | Series 40 & S60 Platform Feedback | 6 | 2008-08-23 15:29 |
| Problem with Skin enabling - disabling and Setting List in S60 | sauvikds | Symbian User Interface | 1 | 2008-08-22 14:45 |
| Problem with Skin enabling - disabling and Setting List in S60 | sauvikds | General Discussion | 1 | 2008-08-21 13:44 |