emulate a key press

Bob Ippolito bob at redivi.com
Sun Feb 29 13:07:47 EST 2004


On 2004-02-29 13:02:54 -0500, Bob Ippolito <bob at redivi.com> said:

> On 2004-02-29 11:51:54 -0500, Bart Nessux <bart_nessux at hotmail.com> said:
> 
>> This probaly isn't possible with Python, but I thought I'd ask.
>> 
>> I want to emulate a key press programatically. I want the computer (G5
>> running Mac OSX 10.3) to think that the user has pressed the space bar on
>> the keyboard. Any module in Python that makes this easy? If not, I'll do
>> something in C.
> 
> I'm pretty sure you'll have to do that in C, I don't believe the API is 
> wrapped.  An even easier way would be to use Pyrex to create a Python 
> extension for what you are trying to do.

Oh, and a better place to ask this question would probably be the 
pythonmac-sig list.

-bob




More information about the Python-list mailing list