473,320 Members | 1,946 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,320 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 5306
>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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.