473,770 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

emulate a key press

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.
Jul 18 '05 #1
2 4184
On 2004-02-29 11:51:54 -0500, Bart Nessux <ba*********@ho tmail.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.

-bob

Jul 18 '05 #2
On 2004-02-29 13:02:54 -0500, Bob Ippolito <bo*@redivi.com > said:
On 2004-02-29 11:51:54 -0500, Bart Nessux <ba*********@ho tmail.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

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1608
by: bulk88 | last post by:
How can I emulate DOM level 1 removeChild in IE 4? I already figured out to emulate getElementById by doing this if((!document.getElementById) && document.all) {document.getElementById = function(id){return document.all;}; } Is there something similar for removeChild?
61
16298
by: /* frank */ | last post by:
I have to do a homework: make a CPU simulator using C language. I have a set of asm instructions so I have to write a program that should: - load .asm file - view .asm file - do a step by step simulation - display registers contents I tried to search con google with no success.
11
2085
by: TempestV | last post by:
Hi All, I have a front end / back end MS Access DB at my workplace. When linking the front-to-back ends in the Linked Table Manager, I specify the network location of the backend as \\servername\sharename\backendname.mdb, which works fine. However, I want to do some development at home but I don't want to have to keep re-linking the tables (this is time consuming as there's actually more than one backend .mdb file). Is there a way I...
14
1721
by: Eugeny Myunster | last post by:
Hello all, How can i emulate sizeof() only for integers?
0
9595
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10232
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10059
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7420
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5454
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3974
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.