Skip to content

Commit f6bdac8

Browse files
author
Fredrik Orderud
committed
Broaden MouseMirror to load for all HID mouse types.
1 parent 1c260d1 commit f6bdac8

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

MouseMirror.ps1

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Get mouse WMI object
22
# HW drivers reside in the "root\wmi" namespace (https://learn.microsoft.com/en-us/windows/win32/wmicoreprov/wdm-provider)
3-
$mouse = Get-CimInstance -Namespace root\WMI -Class MouseMirrorDeviceInformation
3+
$devs = Get-CimInstance -Namespace root\WMI -Class MouseMirrorDeviceInformation
44

5-
Write-Host("Mouse device:")
6-
Write-Host(" InstanceName: {0}" -f $mouse.InstanceName)
7-
Write-Host(" Active: {0}" -f $mouse.Active)
5+
foreach($mouse in $devs) {
6+
Write-Host("Mouse device:")
7+
Write-Host(" InstanceName: {0}" -f $mouse.InstanceName)
8+
Write-Host(" Active: {0}" -f $mouse.Active)
89

9-
Write-Host(" Flipping: LeftRight={0}, UpDown={1}" -f $mouse.FlipLeftRight, $mouse.FlipUpDown)
10+
Write-Host(" Flipping: LeftRight={0}, UpDown={1}" -f $mouse.FlipLeftRight, $mouse.FlipUpDown)
1011

11-
Write-Host("Enabling flipping of mouse movement...")
12-
$mouse.FlipLeftRight = $true
13-
$mouse.FlipUpDown = $true
12+
Write-Host("Enabling flipping of mouse movement...")
13+
$mouse.FlipLeftRight = $true
14+
$mouse.FlipUpDown = $true
1415

15-
Write-Host("Storing changes.")
16-
Set-CimInstance -CimInstance $mouse
16+
Write-Host("Storing changes.")
17+
Set-CimInstance -CimInstance $mouse
18+
}

MouseMirror/MouseMirror.inx

-80 Bytes
Binary file not shown.

MouseMirror/module.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define VER_FILETYPE VFT_DRV
1515
#define VER_FILESUBTYPE VFT2_DRV_SYSTEM
1616
#define VER_COMPANYNAME_STR "" // doesn't show up in file properties
17-
#define VER_FILEDESCRIPTION_STR "IntelliMouse MouseMirror filter driver"
17+
#define VER_FILEDESCRIPTION_STR "MouseMirror filter driver"
1818
#define VER_INTERNALNAME_STR "" // doesn't show up in file properties
1919
#define VER_LEGALCOPYRIGHT_STR L"\251 IntelliMouse sample project"
2020
#define VER_ORIGINALFILENAME_STR "MouseMirror.sys"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Filter drivers for Microsoft Pro IntelliMouse that implements safety checks and
33
### Driver projects
44
| Driver | Description | Test utilities |
55
|-------------|---------------------------------------------------------|----------------|
6-
| **MouseMirror** | An upper device filter driver for the Mouse class for Microsoft Pro Intellimouse. Registers a [MouseMirrorDeviceInformation](MouseMirror/MouseMirror.mof) WMI class that can be accessed from user mode to mirror mouse movement. Can easily be modified to also work with other mouse models. | `MouseMirror.ps1`: PowerShell script for enabling mirroring of mouse movement through the WMI interface. |
6+
| **MouseMirror** | An upper device filter driver for the HID Mouse class. Registers a [MouseMirrorDeviceInformation](MouseMirror/MouseMirror.mof) WMI class that can be accessed from user mode to mirror mouse movement. | `MouseMirror.ps1`: PowerShell script for enabling mirroring of mouse movement through the WMI interface. |
77
| **TailLight** | An upper device filter driver for the HID class for Microsoft Pro Intellimouse. Registers a [TailLightDeviceInformation](TailLight/TailLight.mof) WMI class that can be accessed from user mode to control the tail-light. | `TailLight.ps1`: PowerShell script for updating the tail-light through the WMI interface. |
88
| | | `HidUtil`: Command-line utility for querying and communicating with HID devices. |
99
| | | `flicker`: Application for causing the mouse to blink by sending commands through the WMI interface. |

0 commit comments

Comments
 (0)