×

Discussion Board

Results 1 to 15 of 15

Hybrid View

  1. #1
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Arrow testing new keycapture module 1.3.11 ...

    hello ,

    Before installing the new version you have to de-install the previous version with Application manager !
    After installing new pys60 1.3.11 on my N93(3rd) and printing keycapture doc I'm testing a little

    - Contrary to the doc keycapture seems to work without SwEvent capability !
    - You can also use keycapture._find_all_key() function instead of keycapture.all_keys

    - You can use also directly keycapture.EKeyUpArrow instead of key_codes.EKeyUpArrow (all key_codes constants are imported when you import keycapture !)

    -keycapture.KeyCapturer() calls keycapture._keycapture.capturer()

    - remove_key(arg) is undocumented !
    in source code : Remove key (do not capture this key anymore).
    - key() is undocumented !
    - set_forwarding(arg) could be called ???

    So now I have the SOURCE (thanks Jukka !)

    So I try this snippet
    Code:
    import keycapture
    from appuifw import *
    from e32 import *
    
    def quit(self):
           app.exit_key_handler = None
           script_lock.signal()
           capturer_keys.stop()
    
    def cb_capture(key):
       if key==keycapture.EKeyYes:
         note(u'Capture yes key !')
       else:
         note(u'last key was:'+unicode(capturer_keys.last_key()))  
    
    script_lock = Ao_lock()
    app.exit_key_handler = quit
    capturer_keys=keycapture.KeyCapturer(cb_capture)
    capturer_keys=(keycapture.EKeyYes,keycapture.EKeySelect,keycapture.EKeyEdit)
    capturer_keys.start()
    script_lock.wait()
    There's an error in line containing capturer_keys.start() :
    AttributeError:'tuple' object has no attribute 'stop'

    I look at keycapture.py code and start function is present so what ? (it's tested on N93 phone 3rd edition !)
    Last edited by cyke64; 2006-10-10 at 16:58. Reason: source is here !
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  2. #2
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: testing new keycapture module 1.3.11 ...

    You have a slight typo there. Try this:
    Code:
    capturer=keycapture.KeyCapturer(cb_capture)
    capturer.keys=(keycapture.EKeyYes,keycapture.EKeySelect,keycapture.EKeyEdit)
    capturer.start()

  3. #3
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: testing new keycapture module 1.3.11 ...

    thanks Jukka
    Now I have another error after correcting this typo :

    capturer.start()
    File: "c:\resource\keycapture.py" line 88 in start
    key_id=self._capturer.key(key_code)
    SymbianError:[Errno -46]
    KErrPermissionDenied


    So now ?
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  4. #4
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: testing new keycapture module 1.3.11 ...

    Quote Originally Posted by cyke64
    thanks Jukka
    Now I have another error after correcting this typo :

    capturer.start()
    File: "c:\resource\keycapture.py" line 88 in start
    key_id=self._capturer.key(key_code)
    SymbianError:[Errno -46]
    KErrPermissionDenied


    So now ?
    Hmm, could be that it actually _does_ require SwEvent... is anyone able to replicate this?

  5. #5
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: testing new keycapture module 1.3.11 ...

    Bug has been filled as 1584592
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  6. #6
    Registered User
    Join Date
    Jan 2008
    Posts
    22

    Re: testing new keycapture module 1.3.11 ...

    I've recently tried the above code with PyS60 v. 1.4.1

    I still get the same bug. Has anyone found a solution to the Permission Error problem? Am I just missing something?

    I'd like to have my program run in the background (which I can do using appswitch), and bring it to foreground by pressing the Edit button.

    I've also read this thread, which is relatively recent, but the code is still the same and I still run into the same problem.

    Any help will be appreciated!

    Thanks,
    Hyon

  7. #7
    Regular Contributor
    Join Date
    Dec 2012
    Posts
    63

    Re: testing new keycapture module 1.3.11 ...

    can i use supersis app.it has an option 'permission assistant'

  8. #8
    Regular Contributor
    Join Date
    Dec 2012
    Posts
    63

    Re: testing new keycapture module 1.3.11 ...

    yes its worked.it can enable all permission for your exe.example
    sys/bin/your.exe-

Similar Threads

  1. Replies: 7
    Last Post: 2011-02-12, 18:31
  2. Carbide.j 1.5 and Netbeans 5.5 beta 2
    By ovjo12 in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2007-06-11, 05:43
  3. Replies: 0
    Last Post: 2005-02-17, 19:01
  4. Replies: 0
    Last Post: 2003-10-08, 10:25
  5. SMS I/O Control Application via Evaluation Module
    By alokghosh in forum Nokia M2M
    Replies: 2
    Last Post: 2003-06-18, 17:05

Posting Permissions

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