Overview
Phase One: I would like a driver for keystrokes including combination of keystrokes. The driver must run in kernel mode. This driver will shows as separate devices in device manager and doesn't? replaces the original Windows keyboard or mouse drivers.? I need to able to interface to the driver from a C# program. The interface should provide all the standard keyboard operations, example: all keystrokes from a standard English keyboard including single key, function keys "F1 - F12", enter, CTRL, SHIFT and ALT, combination of keys such as Ctrl + Shft + R, repeating keys like "wwwwwwww".? The company "<[login to view URL]>" creates a Bus for their keyboard/joystick line. I would like to review and discuss this option for my simulated keyboard and mouse driver.
Phase Two: Create mouse driver for the following functions:
1.? Left mouse button down
2.? Left mouse button up
3.? Right mouse button down
4.? Right mouse button up
5.? Middle button down
6.? Middle button up
7.? Mouse movement to specified x,y coordinates
History
On Screen Keyboards, (OSK), work with most applications but do not work with ALL applications as well as web apps. Most OSKs utilize SendInput, PostMessage, SendMessage, etc... but they are high level message calls to Windows message queue. Direct X, DirectInput do not always use these messages and are lost in translations. I need a lower level keyboard driver to simulate a real keyboard and mouse so ALL applications will respond.
## Deliverables
Overview
Phase One: I would like a driver for keystrokes including combination of keystrokes. The driver must run in kernel mode. This driver will shows as separate devices in device manager and doesn't? replaces the original Windows keyboard or mouse drivers.? I need to able to interface to the driver from a C# program. The interface should provide all the standard keyboard operations, example: all keystrokes from a standard English keyboard including single key, function keys "F1 - F12", enter, CTRL, SHIFT and ALT, combination of keys such as Ctrl + Shft + R, repeating keys like "wwwwwwww".? The company "<[login to view URL]>" creates a Bus for their keyboard/joystick line. I would like to review and discuss this option for my simulated keyboard and mouse driver.
Phase Two: Create mouse driver for the following functions:
1.? Left mouse button down
2.? Left mouse button up
3.? Right mouse button down
4.? Right mouse button up
5.? Middle button down
6.? Middle button up
7.? Mouse movement to specified x,y coordinates
History
On Screen Keyboards, (OSK), work with most applications but do not work with ALL applications as well as web apps. Most OSKs utilize SendInput, PostMessage, SendMessage, etc... but they are high level message calls to Windows message queue. Direct X, DirectInput do not always use these messages and are lost in translations. I need a lower level keyboard driver to simulate a real keyboard and mouse so ALL applications will respond.
Research
I believe I may be looking for a Bus created much like the Joystick company "Saitek" did with their drivers. The below screen shot was extracted from Windows 7 "Device Manager".
?
Required Documentation
Document the source code.
Screens or Forms Created
No screens need to be created but a sample console application demonstrating sending keys to any application in focus.
Operating Systems
Windows 7 32/64 bit.
Database
None
Installation Program
Full installation and un-install ability. Some assistance may be required setting up a WDK environment and debug if this is the same environment your firm will be utilizing. I have Visual Studio 2008 / 2010 RC, WDK, and VisualDDK installed.
Testing
The same sample application demonstrating the usage of the simulated keyboard and mouse driver could also serve as a test harness alternating between sending random single keystrokes and combination keystrokes as well as mouse clicks.
Other Information
Component Parts
Keyboard Driver that does not require a physical keyboard or mouse.? This driver will shows as separate devices in device manager and doesn't? replaces the original Windows keyboard or mouse drivers.? A Communications DLL that can communicate with the Keyboard and mouse driver (UserMode DLL that communicates with the Kernel Mode Driver).? An application EXE that can call the DLL to simulate keyboard "keys" and mouse events.? All of which will include source code.
I require source code for both the driver, written in C or C++ and the sample application demonstrating keyboard keys pressed. The interface to the driver must support the following functions:
Keyboard
All the standard keystrokes from an English keyboard 101 including letters A-Z, number 0-9, punctuation <~!@#$%>^&;*(){}?+| \';, function keys F1-F12, ENTER, CTRL, SHIFT, ALT and combination of keys.
An Important Concept: The driver and interface should be fully functioning with no keyboard or mouse connected to the computer. The closest real world example I can think of where this occurs is Virtual Box, <[login to view URL]>, an open source OS virtualization software available at virtualbox.org. When you install a "guest" operating system, VirtualBox installs some fake hardware on the guest operating system such as "Microsoft PS/2 mouse". It is able to generate mouse clicks so that Windows "thinks" it is coming from an actual piece of hardware. I would like similar functionality but would like it available for a "REAL" operating system not just a virtualized one. I want to be able to emulate keystrokes and have "Windows 7" 32/64 believe they are generated at a low level hardware call.
How Will the Virtual Driver Receive Input
A Managed C# Application that can either LoadLibrary("[login to view URL]") or DLLImport("[login to view URL]") a C or C++ DLL that will make the calls to either the bus driver(optional item) or keyboard and mouse driver.? It's important to realize that we do not want to attempt to make unmanaged call to system drivers in C# Managed code.? Using a proxy DLL to make these calls can make sure data is correct sent between the user mode application and the kernel mode driver.? This DLL would be the communications API DLL.
Users will interact with a touch screen and WPF application. Do not create the WPF application as I will create that application but an API that I can make calls to simulate keystroks and mouse clicks. Pressing a button control on the screen will activate a key sequence macro such as RAlt - Space or a single key, example 'a'. The issue working with the Windows message pump and keyboard_event, SendInput, PostMessage, etc... is that they are too high level and DO NOT communicate well with DirectX / DirectInput games. The best architecture I can think of for sending the OS a key stroke or combination of key strokes and mouse clicks is to write to the kernel as if the key scan code came from a keyboard.