Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User josealb's Avatar
    Join Date
    Jul 2009
    Posts
    2
    This is my first post so first of all i want to greet everyone who collaborates in this forum. I've been reading threads for some time and it's amazing how much help you bring

    I'm striving with my first python program, i have already tried some simple things succesfully, but I can't simulate keypresses.

    I've installed keypress1.06.sis I have tried calling libraries like key_modfiers or keypress.py but I keep getting errors like Ekey1 is not defined

    Could someone give me a simple example on how to simulate a keypress?

    I'm sorry if my question is to vague I just don't still have enough experience as to give more information

    thanks in advance

    EDIT:

    this is the code I'm trying

    Code:
    import sys
    
    sys.path.append("E:\\")
    import keypress
    import key_modifiers
    
    keypress.simulate_key(EKey1,EKey1)

  2. #2
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    Hi,

    I am not a python developer I just find link might be helpful to you.

    I think the second parameter should be scan code in simulate_key(keycode, scan code).

  3. #3
    Nokia Developer Champion gaba88's Avatar
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,701
    hello josealb

    welcome to forum nokia Python dibo,

    KKrish has already given you a good link please go through that and i hope your problem will be solved. Just to add to that which device you are testing the script and if its a 3rd edition device make sure your keypress module is signed as it requires some special capability.

    Regards

  4. #4
    Registered User josealb's Avatar
    Join Date
    Jul 2009
    Posts
    2
    Thanks for your help, I'll try what you said now.

    I'm testing it on an N95 8Gb

Similar Threads

  1. [Announce] keypress module 1.0.5
    By y.a.k in forum Python
    Replies: 73
    Last Post: 2012-08-16, 07:39
  2. simulating keypress
    By selvynz in forum Python
    Replies: 28
    Last Post: 2010-08-20, 12:26
  3. Replies: 8
    Last Post: 2009-07-28, 03:38
  4. Replies: 2
    Last Post: 2007-10-18, 00:02
  5. How to filter keypress belonging to foreground app
    By Donnieng in forum Symbian C++
    Replies: 1
    Last Post: 2007-07-09, 04:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved