You Are Here:

Community: Developer Discussion Boards

#1 Old Question 5800 keypress and keycapture - 2009-03-12, 05:32

Join Date: Mar 2009
Posts: 1
iamrave
Offline
Registered User
has anyone ever done this for 5800? i have some problem stimulating keypresses and capturing which keys we're pressed, so for 5800, it's only the green, white and red button,

i tried this codes, and it didn't work:

for keypress
Code:
import keypress
from key_codes import *

keypress.simulate_key(EKeyNo, EScancodeNo)
for keycapture
Code:
import keycapture, appuifw, e32

def cb_capture(key):
	if(key==keycapture.EKeyLeftSoftkey):
		print "Left softkey pressed"
	if(key==keycapture.EKeyNo):
		print "yay"
	elif(key==keycapture.EKeyRightSoftkey):
		print "Right softkey pressed"
		capturer.stop()
		app_lock.signal()

capturer=keycapture.KeyCapturer(cb_capture)
capturer.keys=([keycapture.EKeyLeftSoftkey, keycapture.EKeyRightSoftkey, keycapture.EKeyNo])
print "started"
capturer.start()

app_lock=e32.Ao_lock()
app_lock.wait()
my scriptshell is also signed in symbiansigned, i'm using 1.4.5, hope someone could help me, thanks a lot!
Reply With Quote

#2 Old Re: 5800 keypress and keycapture - 2009-03-12, 22:04

Join Date: Jul 2008
Posts: 41
igordsm
Offline
Registered User
You said your python shell is symbiansigned, right? Does it have the SWEvent capability?

If i'm not mistaken, this capability is required to use the keypress and keycapture modules.


http://igordsm.googlepages.com
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia