473,385 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Software keyboard

Hello. I'm a newbye of Python.
I'm looking for a way of coding a virtual keyboard similar to the one
that comes with Windows (Accessories -> Accessibility -> On Screen
Keyboard).
What I would like to do is make one which is a lot larger and add
transparency to it.
I've a first version in which I used TKinter and Pythonwin.
Can anyone provide me with a snipet of code which would explain how to
send characters to other applications?
The first difficulty that I have is to find which application is active
and has the focus. I think that my keyboard application must be
modeless and cannot receive the focus. But how?
Please help me.
Bye.

Nov 24 '05 #1
1 2555

You need to call keybd_event which is (or was in win3.x - win95 at least) in
USER32.DLL.

Simulate return keypress:
keybd_event(VK_RETURN,0,0,0);
keybd_event(VK_RETURN,0,KEYEVENTF_KEYUP,0);

Google turned this up:
http://www.howtodothings.com/viewart...px?article=395
Note: This is old stuff -- you'll need to handle different versions of
windows where that DLL and API are rennamed -- I beleive it is now
SendInput.

SendMessage and Windows hooks can also work, but not as well in all
circumstances.

If you feel nervous about programming this, you can probably find/buy a COM
component that will do this and call it from Python that way.

But, this would seem to fit the bill out-of-the-box:
http://rutherfurd.net/python/sendkeys/index.html

m
"maxxx_77" <ma*********@libero.it> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hello. I'm a newbye of Python.
I'm looking for a way of coding a virtual keyboard similar to the one
that comes with Windows (Accessories -> Accessibility -> On Screen
Keyboard).
What I would like to do is make one which is a lot larger and add
transparency to it.
I've a first version in which I used TKinter and Pythonwin.
Can anyone provide me with a snipet of code which would explain how to
send characters to other applications?
The first difficulty that I have is to find which application is active
and has the focus. I think that my keyboard application must be
modeless and cannot receive the focus. But how?
Please help me.
Bye.

Nov 24 '05 #2

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

Similar topics

24
by: Uwe Mayer | last post by:
Hi, I have the following inter-class relationships: __main__: (in file LMCMain.py) imports module FileIO defines class LMCMain instanciats main = LMCMain(...) FileIO.py:
2
by: Yosh | last post by:
We are needing to development a strategy where we can track if a user is using a valid license of our software to access a system. Are there recommended strategies or software applications?
10
by: Michel | last post by:
Hi, We are from Belgium and are looking for someone who could write us a point-of-sale (POS) software for a DVD-film shop. I like it to be in MS-Access with some VBA or just VB. The...
7
by: Don Riesbeck Jr. | last post by:
I'm working on an application (OEM) using C# that utilizes input from a keyboard, and USB Barcode Scanner. The scanner is a HID Keyboard device, and input from it is sent to the system as if it...
331
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and...
11
by: ginoplusio | last post by:
Hi, I'm developing a software to send newsletter to the users of my website. I have a problem on the stats, detecting the opening of the newsletter on the user's client. The method I've chosen...
2
by: midoerin | last post by:
How to connect software with keyboard controller in C# ? So the software can interact with the keyboard controller. i want to build a software about learn piano using a keyboard controller, but i...
0
by: jj | last post by:
Academic Software Discounts Students, educators and schools can save up to 85% off commercial pricing. Thousands of products. Fast shipping. http://e.goozw.com/Academic-Software.htm Save Today...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...

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.