473,809 Members | 2,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to intercept a keypress using python?

Hello all,

Does anyone know how to intercept user's keypress or mouseclick in Python?
I'd like to write a small tool (Python-based preferrably) running on
Windows to capture the user's keypresses and mouseclicks and write
them to a file.

Thanks for your help.
Jul 18 '05 #1
1 3065
|Thus Spake Ticachua On the now historical date of Mon, 12 Jan 2004
09:50:38 -0800|
Hello all,

Does anyone know how to intercept user's keypress or mouseclick in Python?
I'd like to write a small tool (Python-based preferrably) running on
Windows to capture the user's keypresses and mouseclicks and write them to
a file.

Thanks for your help.


Some people in alt.2600 and alt.crackers will certainly know where to find
such tools. Have you asked there?

--
Never forget the halloween documents.
http://www.opensource.org/halloween/
""" Where will Microsoft try to drag you today?
Do you really want to go there?"""

Jul 18 '05 #2

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

Similar topics

3
2081
by: Caleb Hattingh | last post by:
Hi Here is a script I want to be able to write (explanation appears after): *** start of script *** import MyCustomMacroLib # This does the magic I would like help for. # This is not python, but the module imported above # will use this block internally and prevent it
2
3090
by: brettk | last post by:
Hello All, I've written a small daemon that monitors a pop3 mailbox and downloads any new messages. It's run from the console in windows, and instead of having it print something each time it gets a message or writes a file, i'd like to store those values as internal variables and print them to the screen whenever the user wants to see them. So, my question is, using a regular console, is there a way I can get python to listen for a...
4
4547
by: Mathias Dahl | last post by:
I have created a small Python program that is running on my desktop. How can I make it listen for a certain keypress (say, Windows-key + space) in a controlled fashion even when it is not the program having focus? I need to do this running under GNOME in Mandrake GN/Linux 10. /Mathias
1
6122
by: Imran | last post by:
Hi, Please bear with me as I have only 1 weeks .NET experience. I am using VB.NET to write a stand-alone client application that connects to a Web service. I successfully send a request for a list of items (i.e. getItemList), and successfully receive the list. I then send a request for individual items from the list (i.e. getItem), and successfully receive the item.
0
1658
by: mevar81 | last post by:
Hello to everybody.I have a problem.I have a property grid that display several properties of a object.I have a properties that store the image but I want to display the file name.So I have modified the editor of the image and the typeconverter of the image. So I have inherit from ImageConverter and from ImageEditor. Everything work fine but when I press the CANC button on the property of the image it doesn't cancel the image but the...
3
2358
by: Vadim Rapp | last post by:
Hi: On my form, I have textbox and combo box. Form's KeyPreview = True. It does work for the textbox, but not for the combo. I.e. Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress me.Text = e.KeyChar End Sub
5
4231
by: Robert W. | last post by:
I'm trying to setup a mechanism whereby I store a formatting code in the Tag of a textbox. This code might be "UpperCase" or "LowerCase" or "NumericOnly". I've been trying out various code in KeyPress and KeyDown but haven't been able to figure out exactly what to do to intercept the keypress and modify the code accordingly. So for example, if "UpperCase" is in effect and I receive an "a" then I will turn it into an "A" on the fly.
1
1703
by: Jeremi | last post by:
Is there anyway, using javascript or an activex script, to intercept keyboard entries on a page, such as the F keys?
7
5244
by: hlubenow | last post by:
Hello, I'd like to check, if a single key is pressed on a Linux xterm. This code waits for a key to be pressed and returns the character: -------------------------------------------- #!/usr/bin/env python import sys
0
9721
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
9601
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
9198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7653
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
6881
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
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
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
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3013
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.