| Reply | « Previous Thread | Next Thread » |
|
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) 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() |
|
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 | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |