[MWB]Remove shortcut for deprecated VKMap functionality(#26484)

* Comment out code hooking Ctrl+Shift+Alt+K to toggle unused UseVKMap setting

* [MWB] Remove UseVKMap and VKMap completely

---------

Co-authored-by: David Taylor <davidt@yadt.co.uk>
This commit is contained in:
Andrey Nekrasov
2023-05-30 18:46:42 +02:00
committed by GitHub
parent b50b587a63
commit 4cc74da82f
7 changed files with 8 additions and 67 deletions

View File

@@ -356,15 +356,7 @@ namespace MouseWithoutBorders.Class
if (Common.DesMachineID == ID.NONE || Common.DesMachineID == ID.ALL || Common.DesMachineID == Common.MachineID)
{
if (nCode >= 0 && Setting.Values.UseVKMap && Setting.Values.VKMap != null && Setting.Values.VKMap.ContainsKey(hookCallbackKeybdData.wVk) && !CtrlDown)
{
InputSimulation.SendKey(hookCallbackKeybdData);
return 1;
}
else
{
return NativeMethods.CallNextHookEx(hKeyboardHook, nCode, wParam, lParam);
}
return NativeMethods.CallNextHookEx(hKeyboardHook, nCode, wParam, lParam);
}
else
{
@@ -645,14 +637,6 @@ namespace MouseWithoutBorders.Class
}
}
}
else if (shiftDown && Setting.Values.VKMap != null && vkCode == (Setting.Values.VKMap.ContainsKey(0) ? (int)Setting.Values.VKMap[0] : 'K'))
{
if (Common.DesMachineID == Common.MachineID || Common.DesMachineID == ID.ALL)
{
Setting.Values.UseVKMap = !Setting.Values.UseVKMap;
return Common.DesMachineID == ID.ALL;
}
}
}
return true;

View File

@@ -96,11 +96,6 @@ namespace MouseWithoutBorders.Class
InputProcessKeyEx(kd.wVk, kd.dwFlags, out bool eatKey);
if (Setting.Values.UseVKMap && Setting.Values.VKMap != null && Setting.Values.VKMap.ContainsKey(kd.wVk) && !ctrlDown)
{
kd.wVk = (int)Setting.Values.VKMap[kd.wVk];
}
if (!eatKey)
{
InputHook.RealData = false;
@@ -380,15 +375,6 @@ namespace MouseWithoutBorders.Class
}
}
}
else if (Setting.Values.VKMap != null && vkCode == (Setting.Values.VKMap.ContainsKey(0) ? (int)Setting.Values.VKMap[0] : 'K'))
{
if (ctrlDown && altDown && shiftDown)
{
ctrlDown = altDown = shiftDown = false;
Setting.Values.UseVKMap = !Setting.Values.UseVKMap;
eatKey = true;
}
}
else if (vkCode == Setting.Values.HotKeyCaptureScreen && ctrlDown && shiftDown && !altDown)
{
ctrlDown = shiftDown = false;

View File

@@ -350,7 +350,6 @@ namespace MouseWithoutBorders.Class
internal static void StartInputCallbackThread()
{
System.Collections.Hashtable dummy = Setting.Values.VKMap; // Reading from registry to memory.
Thread inputCallback = new(new ThreadStart(InputCallbackThread), "InputCallback Thread");
inputCallback.SetApartmentState(ApartmentState.STA);
inputCallback.Priority = ThreadPriority.Highest;

View File

@@ -858,25 +858,6 @@ namespace MouseWithoutBorders.Class
}
}
internal bool UseVKMap
{
get
{
lock (_loadingSettingsLock)
{
return _properties.UseVKMap;
}
}
set
{
lock (_loadingSettingsLock)
{
_properties.UseVKMap = value;
}
}
}
internal bool FirstCtrlShiftS
{
get
@@ -896,14 +877,6 @@ namespace MouseWithoutBorders.Class
}
}
internal Hashtable VKMap
{
get
{
return new Hashtable();
}
}
// Was a value read from registry on original Mouse Without Border, but default should be true. We wrongly released it as false, so we're forcing true here.
// This value wasn't changeable from UI, anyway.
internal bool StealFocusWhenSwitchingMachine => true;