Key Board Hooking and SendInput function

G

Guest

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.
 
V

Vladimir

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top