473,387 Members | 1,512 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,387 software developers and data experts.

Key Board Hooking and SendInput function

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 function for emmulating
key board inputs, not very easy to use..

In am wonder, what are the pros and cons of using SendInput, SendKeys and
KeyBoardEvent?? I have been able to get the SendKeys function to work in the
project and rearrange the keyboard, except for emmulating "PageUp",
"PageDown" (problems with the data types,,).. Another reason that I want to
use SendInput function over SendKeys, is the ease of being able to strip down
the keyboard input to raw data and change what an application would receive...

I am looking for further discussion on these topics. I would be very happy
to share my project code with someone interested in helping me trouble shoot
the SendInput function. The project toggles the keyboard input (new mode = `
/ old mode = esc). In "new mode" the "d" key when pressed becomes a mouse
right click and the "e" key when pressed should place a "t" (thats the
problem), into the keyboard input buffer. The SendInput function fails as it
returns a "0" as oppose to a "1"..

Reference: Paul Kimmel, Managing Low-Level Keyboard Hooks in VB.NET,
Developer. com

Thanks to all that have contributed on my project, either directly by
helping out at discussion group, email or by articles publisher to the web on
Key Board Hooking, SendInput function, Win32 API's,,, Your help has been
priceless.
--

Matthew Kelly
Aug 24 '05 #1
1 5312
>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 function for
emmulating
key board inputs, not very easy to use..


I can help you.
Write me a letter to xozar_(_a_t_)_tut.by.
Aug 25 '05 #2

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

Similar topics

1
by: Barb | last post by:
I am using SendInput to read a line from a file and then simulate typing it into an Edit Control box using SendInput. When I read a file with multiple line, the output file saves the original first...
3
by: David Harris | last post by:
Is there a sendinput function in Visual Studio .net beta 2? I don't see the namespace that you must include for the sendinput function listed on msdn2.microsoft.com. David Harris
6
by: Richard A. Lowe | last post by:
I'm using P/Invoke to call SendInput (using code culled from these newsgroups!) to send mouse events to a window. But I'm unsure how to send double-clicks. A VB6 article I saw on SendInput...
5
by: Tim | last post by:
Hello All, I am writing a program that checks for the NumLock status and turns the NumLock on if it is off. I'm not sure what I'm overlooking at this point, but the code will compile and run, but...
7
by: aam | last post by:
I'm trying to find a code sample on how to use the SendInput Function to simulate a mouse click on a button of another form. I've looked all over and can't find one. Thanks.
0
by: Trammel | last post by:
Hi. Im trying to make a vb.net aplication click location 200,350 on an window who's name is "Blah" (Not owned/started by my application). This has to be done using SendInput as Im coding it for...
1
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...
1
by: ^Def_JaM^ | last post by:
I need a working sample of how to use the "SendInput" (as described in the WinAPI) method to emulate Unicode keystrokes. Most important is the fact that SendInput sample must be able to send Unicode...
7
by: Sin Jeong-hun | last post by:
Hi. I need to simulate keyboard and mouse events. For the first step, I tried to move mouse using SendInput. But it didn't work. I searched all over the internet for an example, but only questions...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
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...
0
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,...

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.