QEMouse is a small Windows mouse driver for QEMU's vmmouse implementation.
It uses QEMU's VMware-compatible backdoor protocol to obtain absolute pointer coordinates while retaining the PS/2 interrupt path as the notification source.
- QEMU absolute pointer coordinates
- Supports Windows 3.11, 95, 98 and ME
- Windows 386/VMD mouse type registration
- DOS/fullscreen mouse handoff through the Windows INT 2F display-switch notifications
- Falls back to normal relative PS/2 input when the VMware-compatible interface is unavailable
- Uses Windows' existing enhanced-mode mouse stack; no additional VxD is required
QEMU's vmmouse implementation queues each host input event as four VMware backdoor words and generates a fake PS/2 mouse event to notify the guest. The PS/2 BIOS callback is therefore used only as a wakeup mechanism when VMware absolute mode is active.
On each notification QEMouse:
- Queries VMware absolute-pointer status.
- Drains every complete 4-word packet currently queued.
- Reports absolute coordinates directly to Windows using
SF_ABSOLUTE. - Converts VMware's current left/right button state into Windows button transition events.
Draining the complete queue is intentional. QEMU can retain stale vmmouse packets if a fake PS/2 notification is missed; consuming all complete packets prevents the guest pointer from developing a permanent event backlog.
For DOS/fullscreen switching under Windows enhanced mode, QEMouse uses the INT 2F display-switch notifications. When Windows switches a VM to the background, QEMouse releases QEMU's vmmouse input handler so the DOS session can use normal relative PS/2 input. When Windows returns to the foreground, absolute vmmouse mode is restored from the normal PS/2 callback path.
You can download the latest version from the Releases page.
For an existing Windows installation, place qemouse.inf and qemouse.drv in the same directory.
Right-click qemouse.inf and choose Install, then reboot Windows.
Copy qemouse.drv to the Windows SYSTEM directory and set:
[boot]
mouse.drv=qemouse.drv
in SYSTEM.INI, then restart Windows.
QEMU's VMware-compatible VMPort interface must be available to the guest.
For machine types where VMPort is not enabled automatically, enable it with:
-machine vmport=on
QEMouse detects the VMware-compatible backdoor and absolute-pointer interface when Windows loads the driver.
If the absolute-pointer interface is unavailable, QEMouse falls back to conventional relative PS/2 mouse input.
QEMouse uses Open Watcom and the Windows headers supplied with it.
After loading an Open Watcom environment, run:
wmake qemouse.drv
To build a 1.44 MB floppy image containing qemouse.drv and qemouse.inf:
wmake flp
Special thanks to Javier S. Pedro, this project would not exist without his invaluable work.
