473,790 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

intercepting keypresses, mouse movements, joystick movements.

Hi,

I've been looking at autohotkey to do some different usability hacks
for windows http://www.autohotkey.com/
one of the benefits of this language is it allows one to catch
keyboard usage, joystick usage, and mouse usage inputs very easily at
a global level or at application levels by watching applications for
events within the applications.

I was wondering if there were any python libraries that provided
similar functionality before I went ahead with the project though.

Cheers,
Bryan Rasmussen
Oct 9 '06 #1
2 4786

bryan rasmussen wrote:
Hi,

I've been looking at autohotkey to do some different usability hacks
for windows http://www.autohotkey.com/
one of the benefits of this language is it allows one to catch
keyboard usage, joystick usage, and mouse usage inputs very easily at
a global level or at application levels by watching applications for
events within the applications.

I was wondering if there were any python libraries that provided
similar functionality before I went ahead with the project though.

Cheers,
Bryan Rasmussen
You might take a look at pyHook:
http://sourceforge.net/project/showf...ckage_id=92632

Oct 9 '06 #2
Another option is to look at pywin32, which I believe has the
SetWindowsHook[Ex] commands, or to use ctypes (which is built in if
you're using python2.5) to load the neccessary dll's to use that
function. However, pyHook should be good unless you need something for
the joystick (don't think that's covered), or for detecting system or
dead keys (unless pyHook has been updated recently, the last time I
checked the docs said it didn't capture those keys).

Good Luck,
Jordan

TheSeeker wrote:
bryan rasmussen wrote:
Hi,

I've been looking at autohotkey to do some different usability hacks
for windows http://www.autohotkey.com/
one of the benefits of this language is it allows one to catch
keyboard usage, joystick usage, and mouse usage inputs very easily at
a global level or at application levels by watching applications for
events within the applications.

I was wondering if there were any python libraries that provided
similar functionality before I went ahead with the project though.

Cheers,
Bryan Rasmussen

You might take a look at pyHook:
http://sourceforge.net/project/showf...ckage_id=92632
Oct 9 '06 #3

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

Similar topics

4
3096
by: simo | last post by:
I'm looking to make an app to record my mouse movements and play them back. It will essentially be for unit testing websites, so I suppose it could be done using one of the wxPython MSIE ActiveX widgets, but I'd like it to work on other platforms and not just in web browsers. Anyone got any ideas for how this could be done? I guess if reading/writing mouse movements is difficult, I could limit
1
1998
by: Jonny | last post by:
Hi all, Does anyone know how to capture the Windows Keys (I know that they are out of the ascii key range) and how to capture and record Mouse movements? Thanks, /Jonny
1
23460
by: Bleedledeep | last post by:
I am new to C#/.NET/DirectX, and could not find a simple example of how to read the X/Y location of the joystick. < YIKES!!! The DirectX.DirectInput is one serious pile of API! > After some futzing around, I came up with the following - which seems to work just fine. I'm looking for a sanity check here, is this a good way to access the joystick? Yeah, yeah, I only look for the first joystick, and there is some hardcoded silliness in...
1
1687
by: John | last post by:
Hi all: I have an application that hides itself and displays an icon in the system tray. Is it possible for this application to detect keystrokes and/or mouse movements while hidden/minimized. So the application is not loaded and visible, so mouse movements on the form won't work, I need the program to be able to detect mouse movement on the system level. Thanks in advance.
1
19238
by: Benny Raymond | last post by:
In my attempt to make a macro recording program where i can then playback mouse movements i'm running into a big problem: I'm trying to simulate the movement of the mouse to a point on the screen. With my current code the mouse is only moving in the X direction and not in the Y direction (however my debug line is telling me that it's trying to move in the Y as well). I've read everything I could find online, tried some hacky ways of...
2
2351
by: Klaus Jensen | last post by:
Hi! I need an ASP.net control, which makes it possible for the user to define imagemaps. I show an image, the user can define areas (polygons would be nice, but just rectangles is ok), and I can access these areas, save them and use them to generate imagemaps. It is to be used with maps, where the client can add information to areas of
3
34831
by: madhuri.eerupula | last post by:
Hi. How to simulate(automatic) mouse movements and click operation using c#. Actually, i got pixels in the face (face tracking) right now and i need to move mouse(automatically, without using mouse manually) i.e., simulate mouse click operation using those pixels in c#. I think we can use robot() class in java , to achieve this, but how can we do this using c#. Hope you understand my problem and get bck to me asap. thanx bye
1
1729
by: mflll | last post by:
I am having trouble responding writing a Javascript Program respond to keypresses on top of a paragraph. Here is the code I tried: <HTML> <SCRIPT Language="JavaScript"> document.write("TEeve"); function QQ(event){ alert("Key Pressed " + event.charCode()); }
2
1432
by: DanAusitn | last post by:
Good morning folk, a quick question to anyone who can help. i am working on a program and i am using the below code to simulate mouse movement to certain co-ords, but the thing is the co-ords 0 , 0 refer to the position at the very top left of the monitor. what i want is for the co-ords 0 , 0 to refer to the top left in my form so the mouse clicks and movements stay inside the form.
0
9666
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
10413
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
10200
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...
0
9986
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7530
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
6769
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
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3707
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.