473,785 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hooking the Keyboard and redirecting keystrokes

Ok... so call me crazy, but I have an idea and I'm looking for where to
start...

I want to write an application that catches keystrokes and then either
redirects them to the in focus window or another window based on some
simple rules... in some cases the keystrokes would need to be sent out
to multiple windows.

I've done part of this in the past using a C++ application to hook the
Win32 keyboard API and dispose of unwanted keystrokes (Specifically a
windows key killer). But since I've never tried to go on and send
those keys to a final destination I figured I'd ask for some help on
where to start.
>From what I see SendKeys isn't suited for this as it requires the app
to be focused to receive input...

Thanks,

Zanthor

Jan 23 '07 #1
1 3741
As mentioned in the original post SendKeys isn't appropriate as it
requires focus. I need to send input to non-focused applications. Any
other ideas?

Thanks,

Will
RizwanSharp wrote:
System.Windows. Forms.SendKeys. Send(...);
Should help You.
But for this to work you need to activate the window to which you want to
send the keys. Because Send Keys sends Key Strokes to the current Active
Window.
Bes Regards,
Rizwan aka RizwanSharp

"zanthor" wrote:
Ok... so call me crazy, but I have an idea and I'm looking for where to
start...

I want to write an application that catches keystrokes and then either
redirects them to the in focus window or another window based on some
simple rules... in some cases the keystrokes would need to be sent out
to multiple windows.

I've done part of this in the past using a C++ application to hook the
Win32 keyboard API and dispose of unwanted keystrokes (Specifically a
windows key killer). But since I've never tried to go on and send
those keys to a final destination I figured I'd ask for some help on
where to start.
>From what I see SendKeys isn't suited for this as it requires the app
to be focused to receive input...

Thanks,

Zanthor
Jan 23 '07 #2

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

Similar topics

0
1593
by: Tony Pirkle | last post by:
In a former query: Modeless Form Ignores Keystrokes ONLY when called from VB.Net, I explain that I have a VB6 form that's not getting it's keystrokes. The events are firing, but the controls aren't responding to them. Is there a way to capture these keyboard events on the .Net side and resend the keys to VB6 (SendKeys comes to mind)? Please respond if you have an idea. Thanks!
1
5370
by: Matthew Kelly | last post by:
I have pulled together a VB.net project that hooks the keyboard (Ref. Paul Kimmel's hooking program) and allow the user to send "mouse right clicks" via the SendInpuut function (mouse emulation works fine). I am also trying to make this project capable of "Rearrange the keyboard" (example type "e" and "K" is sent to the application) by using SendInput function and I am not able to get it to work. I am finding the use of SendInput...
0
1785
by: David G. | last post by:
The keyboard type ahead buffer does not seem to work in Access 2003 in certain situations. We would like some help with this. Here are the details. We have a large program that was developed in Access 2000. We are now converting it to Access 2003. The program has a form for entering orders. Each order usually consists of dozens of items. To enter the items on the order the entry person
7
8787
by: hokiegal99 | last post by:
I am a relative c newbie, so bare with me. I need to write a program that writes all keyboard keystrokes into a text file (up to 500KB at which point it would begin overwriting itself) regardless of what application the user is inputing data into (email, office documents, etc). The purpose of this program is to have a real time backup of user input so that user input can be restored when a PC crashes or unexpectedly looses power. The...
8
1974
by: pigeonrandle | last post by:
Hi, Has anyone had any experience with hooking messages in other application windows (like SPY++). I want to listen for WM_MOVE messages, but can only seem to find examples of Keyboard and Mouse hooks. Please (and thankyou), James Randle.
1
6825
by: Louis Cypher | last post by:
I'm working on an application (OEM) using c# that uses input from a keyboard and a USB Barcode Scanner. I need to be able to identify keystrokes from the barcode scanner and remove them from the message queue, regardless of what application has focus. I can identify the keystrokes and input device by registering for raw input (RegisterRawInputDevices) and processing the WM_INPUT message. This gives me the keystrokes and the ability to...
1
11236
by: Louis Cypher | last post by:
I'm working on an application (OEM) using c# that uses input from a keyboard and a USB Barcode Scanner. I need to be able to identify keystrokes from the barcode scanner and remove them from the message queue, regardless of what application has focus. I can identify the keystrokes and input device by registering for raw input (RegisterRawInputDevices) and processing the WM_INPUT message. This gives me the keystrokes and the ability to...
2
1538
by: petinboy | last post by:
Hi All! I am developing an accessibility keyboard application with Visual Studio 2005 Professional Edition and with C#. The application is a keyboard with buttons that interacts with any application on windows, such as Word, Messenger, IExplorer... The keyboard is on the bottom of the desktop and the other application is on the top of the desktop. The keyboard interacts with other applications using the SendKeys class. When I send...
1
2009
by: adam2009 | last post by:
Hey all, I try to find some code that will log to some txt file all the keystrokes in a smartphone. I have read many blogs about it, but I'm still confused. There are two blogs that i tried to understand 1.http://mikeunderhill.blogspot.com/2005/09/overriding-forms-wndproc-in-net-cf-20.html 2. http://blog.opennetcf.com/ayakhnin/CategoryView,category,Compact%20Framework.aspx
0
9645
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
10155
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
10095
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
8979
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...
0
6741
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
5383
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
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
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
3656
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.