473,657 Members | 3,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Generating key press sequence

Hi,

I want to get all key press messages and for some keys I want to generate
extra key press messages to simulate fast typing. For example if someone
press 'H' my app should catch and change it with "Hello". It should work
system wide. I know little about hooks and playback but it does not help me.
I am waiting for your help.

Thanks in advance.
Jul 19 '06 #1
6 3102
Kürşat wrote:
Hi,

I want to get all key press messages and for some keys I want to generate
extra key press messages to simulate fast typing. For example if someone
press 'H' my app should catch and change it with "Hello". It should work
system wide. I know little about hooks and playback but it does not help
me. I am waiting for your help.

Thanks in advance.
Hi,

Actually, hooks will help you a lot. The way to capture a system-wide
keypress is you use a keyboard hook. There are quite a few examples on
CodeProject (http://www.codeproject.com) about creating keyboard hooks.

And, IIRC, there's an Windows API call that goes by the name
of 'keybd_event', or something similar, which you /might/ be able to use to
simulate a keypress.

--
Hope this helps,
Tom Spink

Google first, ask later.
Jul 19 '06 #2
Thanks Tom,

I try to use hooks but,
while using hooks, I need target window's handle to send more keyboard
messages to that window. I could not find any way to get handle of the
target window when the hook catches the keyboard message.

"Tom Spink" <ts****@gmail.c omwrote in message
news:O7******** ******@TK2MSFTN GP04.phx.gbl...
Krat wrote:
>Hi,

I want to get all key press messages and for some keys I want to generate
extra key press messages to simulate fast typing. For example if someone
press 'H' my app should catch and change it with "Hello". It should work
system wide. I know little about hooks and playback but it does not help
me. I am waiting for your help.

Thanks in advance.

Hi,

Actually, hooks will help you a lot. The way to capture a system-wide
keypress is you use a keyboard hook. There are quite a few examples on
CodeProject (http://www.codeproject.com) about creating keyboard hooks.

And, IIRC, there's an Windows API call that goes by the name
of 'keybd_event', or something similar, which you /might/ be able to use
to
simulate a keypress.

--
Hope this helps,
Tom Spink

Google first, ask later.

Jul 19 '06 #3
"Kürþat" wrote:
I want to get all key press messages and for some keys I want to generate
extra key press messages to simulate fast typing. For example if someone
press 'H' my app should catch and change it with "Hello". It should work
system wide. I know little about hooks and playback but it does not help
me. I am waiting for your help.
I try to use hooks but,
while using hooks, I need target window's handle to send more keyboard
messages to that window. I could not find any way to get handle of the
target window when the hook catches the keyboard message.
A global keyboard hook (WH_KEYBOARD_LL ) will enable you to monitor keyboard
messages across all applications. When you monitor a specific key, you can
then add your own key events to simulate rapid typing.

We offer a .NET component FREE for non-commercial use that will monitor
global keystrokes and enable you to generate your own additional keystrokes.
Check it out at:

http://www.mini-tools.com/goto/input

--
Timm Martin
Mini-Tools
..NET Components and Windows Software
http://www.mini-tools.com

Jul 19 '06 #4
Thank you,
It is great, but I want to know how and want to see code.

"Mini-Tools Timm" <info at mini-tools dot comwrote in message
news:4C******** *************** ***********@mic rosoft.com...
"Kür?at" wrote:
>I want to get all key press messages and for some keys I want to
generate
extra key press messages to simulate fast typing. For example if
someone
press 'H' my app should catch and change it with "Hello". It should
work
system wide. I know little about hooks and playback but it does not
help
me. I am waiting for your help.
>I try to use hooks but,
while using hooks, I need target window's handle to send more keyboard
messages to that window. I could not find any way to get handle of the
target window when the hook catches the keyboard message.

A global keyboard hook (WH_KEYBOARD_LL ) will enable you to monitor
keyboard
messages across all applications. When you monitor a specific key, you
can
then add your own key events to simulate rapid typing.

We offer a .NET component FREE for non-commercial use that will monitor
global keystrokes and enable you to generate your own additional
keystrokes.
Check it out at:

http://www.mini-tools.com/goto/input

--
Timm Martin
Mini-Tools
.NET Components and Windows Software
http://www.mini-tools.com

Jul 19 '06 #5
"Kürþat" wrote:
Thank you,
It is great, but I want to know how and want to see code.
Yes, I understand. Though the component itself is free for non-commercial
use, we also offer the C# and VB source code for sale (gotta make a living
somehow ;-) Check out the Blueprint Edition:

http://www.mini-tools.com/store/index.htm#input

BTW, we are about to release v2.0 which provides Visual Studio Designer
support (simply drag & drop global hooks on any Windows form).

--
Timm Martin
Mini-Tools
..NET Components and Windows Software
http://www.mini-tools.com

Jul 19 '06 #6
Kürşat wrote:
Thank you,
It is great, but I want to know how and want to see code.

"Mini-Tools Timm" <info at mini-tools dot comwrote in message
news:4C******** *************** ***********@mic rosoft.com...
>"Kür?at" wrote:
>>I want to get all key press messages and for some keys I want to
generate
extra key press messages to simulate fast typing. For example if
someone
press 'H' my app should catch and change it with "Hello". It should
work
system wide. I know little about hooks and playback but it does not
help
me. I am waiting for your help.
>>I try to use hooks but,
while using hooks, I need target window's handle to send more keyboard
messages to that window. I could not find any way to get handle of the
target window when the hook catches the keyboard message.

A global keyboard hook (WH_KEYBOARD_LL ) will enable you to monitor
keyboard
messages across all applications. When you monitor a specific key, you
can
then add your own key events to simulate rapid typing.

We offer a .NET component FREE for non-commercial use that will monitor
global keystrokes and enable you to generate your own additional
keystrokes.
Check it out at:

http://www.mini-tools.com/goto/input

--
Timm Martin
Mini-Tools
.NET Components and Windows Software
http://www.mini-tools.com
Hi,

If you can find the code to implement a global hook, and you manage to get
that working, you'll easily be able to push keystrokes into the keybuffer,
by manipulating the reference parameters of the hook procedure.

--
Hope this helps,
Tom Spink

Google first, ask later.
Jul 19 '06 #7

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

Similar topics

6
5532
by: Poul Møller Hansen | last post by:
I have made a stored procedure, containing this part for generating a unique reference number. SET i = 0; REPEAT SET i = i + 1; SELECT RAND() INTO reference FROM SYSIBM.SYSDUMMY1; SET p_reference = ref_prefix || SUBSTR(CAST(reference AS CHAR(12)),3);
3
2296
by: raj | last post by:
hi, i have one textbox and one save button, i have added attribute at page load event btnSave.Attributes.Add("onclick","return ValidateForm();"); in validationform() ,I have written like this if(--some validation function here--) {
1
2857
by: louis_la_brocante | last post by:
Dear all, I am having trouble generating a client proxy for a webservice whose methods return a "complex" type. The type is complex in that it is a class whose members are a mix of primitive types and of more elaborate classes implementing IXmlSerializable. The resulting WSDL file for the webservice has two separate schemas in its <types> sections, and the client proxy (generated with wsdl.exe) is missing the definitions of the...
0
1985
by: bbalet.free.fr | last post by:
The “Add Web Reference†Visual tool generates bad classes (from WSDL schema) for ComplexType containing only one element (wsdl.exe and wseWsdl3.exe tools have the same problem) : if a ComplexType A contains only one element, the tool don’t generate a class for the ComplexType A. It generates a class only for the element type (B) included in this ComplexType (if this type contains more than one element...). For types in WSDL schéma...
9
11927
by: Cesar | last post by:
Hello there, A java programmer sent me a wsdl file, which I have to use to consume his web methods. When I run the wsld.exe tool to generate the class' code, I get the following message: CODEGEN: The operation binding 'getAvaluos' from namespace 'urn:m15.AvaluosPortType' was ignored. The combination of style=rpc with use=literal is not supported.
5
8360
by: dav3 | last post by:
Howdy folks, was wondering if anyone could assist me in a better method for generating a alphanumeric sequence of 6 characters/digits. The method I am currently using gives me a random license plate number for a project I am working on. But I am unsatisfied with the results I am getting. Here is my current method, it works but like I said there has to be a better way of doing it. public static String plate() { int x = 6; char plate...
6
3433
by: py_genetic | last post by:
Hi, I'm looking to generate x alphabetic strings in a list size x. This is exactly the same output that the unix command "split" generates as default file name output when splitting large files. Example: produce x original, but not random strings from english alphabet, all lowercase. The length of each string and possible combinations is
26
7895
by: bilgekhan | last post by:
What is the correct method for generating 2 independent random numbers? They will be compared whether they are equal. What about this method: srand(time(0)); int r1 = rand(); srand(rand()); int r2 = rand(); bool f = r1 == r2;
0
2139
by: TeenaRoz | last post by:
Hi, I am using axis jars to convert my java classes into wsdl for API purpose. I notice that, instead of generating the parameter names same as what my method accepts, I am getting it as param0,param1 etc.. here is an examle <xs:sequence> <xs:element minOccurs="0" name="param0" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="param1" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="param2"...
0
8384
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
8820
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
8718
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
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7314
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
6162
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
5630
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
4150
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...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.