Windows XP Community - XPHeads



simulate keys

microsoft.public.windowsxp.device_driver.dev


Reply
  #1 (permalink)  
Old 05-20-2008, 03:17 PM
retn
 
Posts: n/a
simulate keys

hey guys.

im new in developing device drivers.

my problem is that i want to write a driver which simulates
keyhits, like a virtual keyboard.

it must be a driver, it cant be the simple winapi, like sendkeys
oder sendmessage. there was a thread b4 with a similar name, but i
think this will be a bit different. i hope so.

ive read and tried alot but nowhere in the inet is an exactly example
how to setup a keyhit, not even in the ddk src\input\kbdfilter or
i8042prt dir.

ive tried this.

i made a pdo "FILE_DEVICE_UNKNOWN" which handles custom ioctls.
then i added a fdo "FILE_DEVICE_KEYBOARD" to the pdo like
in the input\kbfilter example in the ddk. i dont know if the fdo
worked, but it
didnt result in a bsod or disabled keyboard. i thought about reading
keys
to proof but i was a bit lazy :S.
well, after the driver recved the custom ioctl of my user app, i tried
to
setup a keyhit with the key_input_data structure. result was a bsod.
which kind? i dunno but there were a few different.

ive read alot about kbfilter and i8042prt and it really confused me.
issit that difficult to simulate a simple key?
i would appreciate it, if the answer is no.

greetz & thanks
retn


--
retn
------------------------------------------------------------------------
retn's Profile: http://forums.techarena.in/member.php?userid=49900
View this thread: http://forums.techarena.in/showthread.php?t=971865

http://forums.techarena.in

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-20-2008, 06:15 PM
Doron Holan [MSFT]
 
Posts: n/a
Re: simulate keys
you should look into a HID miniport. this will allow you to report
keystrokes and use existing in box HID keyboard stack. look at
\WinDDK\6001.18000\src\kmdf\hidusbfx2 for a KMDF HID miniport example. this
driver uses the fx2 test board to simulate HID input, but you can easily not
use USB and just inject your own input.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"retn" <retn.39pvrd@DoNotSpam.com> wrote in message
news:retn.39pvrd@DoNotSpam.com...
>
> hey guys.
>
> im new in developing device drivers.
>
> my problem is that i want to write a driver which simulates
> keyhits, like a virtual keyboard.
>
> it must be a driver, it cant be the simple winapi, like sendkeys
> oder sendmessage. there was a thread b4 with a similar name, but i
> think this will be a bit different. i hope so.
>
> ive read and tried alot but nowhere in the inet is an exactly example
> how to setup a keyhit, not even in the ddk src\input\kbdfilter or
> i8042prt dir.
>
> ive tried this.
>
> i made a pdo "FILE_DEVICE_UNKNOWN" which handles custom ioctls.
> then i added a fdo "FILE_DEVICE_KEYBOARD" to the pdo like
> in the input\kbfilter example in the ddk. i dont know if the fdo
> worked, but it
> didnt result in a bsod or disabled keyboard. i thought about reading
> keys
> to proof but i was a bit lazy :S.
> well, after the driver recved the custom ioctl of my user app, i tried
> to
> setup a keyhit with the key_input_data structure. result was a bsod.
> which kind? i dunno but there were a few different.
>
> ive read alot about kbfilter and i8042prt and it really confused me.
> issit that difficult to simulate a simple key?
> i would appreciate it, if the answer is no.
>
> greetz & thanks
> retn
>
>
> --
> retn
> ------------------------------------------------------------------------
> retn's Profile: http://forums.techarena.in/member.php?userid=49900
> View this thread: http://forums.techarena.in/showthread.php?t=971865
>
> http://forums.techarena.in
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-26-2008, 09:41 AM
retn
 
Posts: n/a
Re: simulate keys

alright, thanks, ill give it some tries


--
retn
------------------------------------------------------------------------
retn's Profile: http://forums.techarena.in/member.php?userid=49900
View this thread: http://forums.techarena.in/showthread.php?t=971865

http://forums.techarena.in

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:29 PM.








Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74