WIP - [Mouse Without Borders] - refactoring "Common" classes (Part 6 of 7) #43208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Part 6 of a slow-running 7-part refactor of the giant "Common" class in Mouse Without Borders into individual classes with tighter private scope.
In this PR:
Common.Encryption.cs->Core/Encryption.csCommon.Package.cs->Core/<multiple files>.csCommon.ShutdownWithPowerToys.cs->Core/ShutdownWithPowerToys.csCommon.VK.cs->Core/VK.cs,Core/WM.csCommon.WinAPI.cs->Core/WinAPI.csPR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
Run manual tests from Test Checklist Template:
Install PowerToys on two PCs in the same local network:
netsh advfirewall firewall add rule name="PowerToys.MouseWithoutBorders" dir=in action=allow program="C:\src\mc\PowerToys\x64\Debug\PowerToys.exe" enable=yes remoteip=any profile=any protocol=tcp"Setup Connection:
Verify Connection Status:
Test Remote Mouse/Keyboard Control:
Test Remote Control with Elevated Apps:
get-process -Name "PowerToys.MouseWithoutBorders*" -IncludeUserName | format-table Id, ProcessName, UserNamePowerToys.MouseWithoutBorders.exe- running asSYSTEMPowerToys.MouseWithoutBorders.Helper.exe- running as current userget-service -Name "PowerToys.*" | ft Status, Name, UserName; get-ciminstance -Class "Win32_Service" -Filter "Name like 'PowerToys%'" | ft ProcessId, NamePowerToys.MWB.Service- running asLocal SystemTest Module Enable Status:
Test Disconnection/Reconnection:
Test Various Local Network Conditions:
Clipboard Sharing:
Drag and Drop:
Lock and Unlock with "Use Service" Enabled:
Test Settings:
Group Policy Tests
See https://learn.microsoft.com/en-us/windows/powertoys/grouppolicy
[missing]- "Activation -> Enable Mouse Without Borders" enabled, with GPO warning hiddenreg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v ConfigureEnabledUtilityMouseWithoutBorders /f0- "Activation -> Enable Mouse Without Borders" set to "off" and disabled, with GPO warning visiblereg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v ConfigureEnabledUtilityMouseWithoutBorders /t REG_DWORD /d 0 /f1- "Activation -> Enable Mouse Without Borders" set to "on" and disabled, with GPO warning visiblereg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v ConfigureEnabledUtilityMouseWithoutBorders /t REG_DWORD /d 1 /f[missing]- "Advanced Settings -> IP address mapping" enabled, with GPO warning hiddenreg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v MwbDisableUserDefinedIpMappingRules /f0- "Advanced Settings -> IP address mapping" enabled, with GPO warning hiddenreg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v MwbDisableUserDefinedIpMappingRules /t REG_DWORD /d 0 /f1- "Advanced Settings -> IP address mapping" disabled, with GPO warning visiblereg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v MwbDisableUserDefinedIpMappingRules /t REG_DWORD /d 1 /f[missing]- "Advanced Settings -> IP address mapping" enabled, with GPO warning and GPO values hiddenreg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v MwbPolicyDefinedIpMappingRules /f[empty value]- "Advanced Settings -> IP address mapping" enabled, with GPO warning hidden and GPO values hiddenreg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v MwbPolicyDefinedIpMappingRules /t REG_MULTI_SZ /d "" /f[non-empty value]- "Advanced Settings -> IP address mapping" enabled, with GPO warning visible and GPO values visiblereg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v MwbPolicyDefinedIpMappingRules /t REG_MULTI_SZ /d "aaa 10.0.0.1\0bbb 10.0.0.2" /f