468,505 Members | 1,591 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

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 5058
>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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Barb | last post: by
3 posts views Thread by David Harris | last post: by
6 posts views Thread by Richard A. Lowe | last post: by
5 posts views Thread by Tim | last post: by
7 posts views Thread by aam | last post: by
reply views Thread by Trammel | last post: by
1 post views Thread by Matthew Kelly | last post: by
7 posts views Thread by Sin Jeong-hun | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.