Creating continuous keystroke with python

A

Abhas Bhattacharya

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.
 
D

Dennis Lee Bieber

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/
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top