×

Discussion Board

Results 1 to 15 of 15

Threaded 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

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
  •  
×