We continue set of articles about interesting technology areas and solutions we have implemented or encountered in our projects.
This article briefly describes our experience in development of virtual mouse drivers and virtual keyboard drivers.
Virtual device driver definition
Virtual device drivers represent a particular variant of device drivers. They are used to emulate a hardware device, particularly in virtualization environments. Virtual devices may also operate in a non-virtualized environment. For example a virtual network adapter is used with a virtual private network, while a virtual disk device is used with iSCSI. A good example for virtual device drivers can be Daemon Tools.
Or similar to usage scenario in our case – programmable macros execution.
A virtual device driver (VxD) is a software device driver that emulates hardware and other devices so that multiple applications running in protected mode can access hardware interrupt channels, hardware resources and memory without causing conflicts. The VxD was superseded by the Windows Driver Model (WDM) and is now obsolete.
HID device definition
A human interface device or HID is a type of computer device that interacts directly with, and most often takes input from, humans and may deliver output to humans. The term “HID” most commonly refers to the USB-HID specification.
In computing, the USB human interface device class (USB HID class) is a part of the USB specification for computer peripherals: it specifies a device class (a type of computer hardware) for human interface devices such as keyboards, mice, game controllers and alphanumeric display devices.
Our usage scenario – Virtual Playback drivers
We required programmable macros’ execution in Games and in other software. Imagine, you’d like to use a keyboard or mouse events macros in your favorite game for the most effective tactic execution. So you use macros programming tools and then attach it to specific event, would it be software or HID-device trigger. Sometimes it is also called Virtual Playback drivers.
Therefore virtual mouse driver and virtual keyboard drivers were implemented.
- Virtual driver is quite difficult to debug in typical virtual machine environment so we were using specific tools for virtualization.
- Response speed in games – we need real-time feedback from game to user and back.
Links we find useful
- Windows Mouse Input WDF Filter Driver sample
- Microsoft Related HID Documentation
- Microsoft Related VxD Documentation
- Writing a Linux device driver module for kernels
- A Simple Driver for Linux OS