Creating continuous keystroke with python

Discussion in 'Python' started by Abhas Bhattacharya, Jan 13, 2013.

  1. I need to generate continuous keystroke with python. I have been trying with the sendkeys module, but the only command it supports is sending discretekeypresses. But I need a continous keypress, so that the other application(which in this case is a game which triggers an action only when a key is continously pressed for some time)can recognise it as such. Also I tried using the sendkeys function on pywin32 api, but it does the same thing too. My hope is there will be another function in pywin32 or some other api whichcan create seperate keydown event and keyup event so that I can bypass thekeydown event for some time.
    Abhas Bhattacharya, Jan 13, 2013
    #1
    1. Advertising

  2. On Sun, 13 Jan 2013 07:36:51 -0800 (PST), Abhas Bhattacharya
    <> declaimed the following in
    gmane.comp.python.general:

    > I need to generate continuous keystroke with python. I have been trying with the sendkeys module, but the only command it supports is sending discrete keypresses. But I need a continous keypress, so that the other application (which in this case is a game which triggers an action only when a key is continously pressed for some time)can recognise it as such. Also I tried using the sendkeys function on pywin32 api, but it does the same thing too. My hope is there will be another function in pywin32 or some other api which can create seperate keydown event and keyup event so that I can bypass the keydown event for some time.


    http://batchloaf.wordpress.com/2012/04/17/simulating-a-keystroke-in-win32-c-or-c-using-sendinput/
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Jan 13, 2013
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JustJohn
    Replies:
    6
    Views:
    638
    JustJohn
    Mar 29, 2006
  2. Eric Texier

    python on mac keystroke

    Eric Texier, Apr 26, 2005, in forum: Python
    Replies:
    1
    Views:
    439
    Ian A. York
    Apr 26, 2005
  3. Nicolas Pernetty

    Continuous system simulation in Python

    Nicolas Pernetty, Oct 7, 2005, in forum: Python
    Replies:
    19
    Views:
    1,428
    Nicolas Pernetty
    Oct 12, 2005
  4. Harry George

    Python Projects Continuous Integration

    Harry George, Jul 28, 2006, in forum: Python
    Replies:
    8
    Views:
    415
  5. Hussein B
    Replies:
    6
    Views:
    519
    Leonid Shalupov
    Jul 31, 2008
Loading...

Share This Page