SetDeviceFilterState no longer called on a keyboard, it decides for itself

device-handlers
Clive Galway 2 years ago
parent 6d96cbfb5b
commit 392ac98ba1

@ -29,6 +29,7 @@ namespace AutoHotInterception.DeviceHandlers
WorkerThreads.TryAdd(code, new WorkerThread());
WorkerThreads[code].Start();
}
IsFiltered = true;
}
/// <summary>
@ -60,6 +61,7 @@ namespace AutoHotInterception.DeviceHandlers
DeviceWorkerThread.Start();
}
}
IsFiltered = true;
}
public void UnsubscribeKeyboard()
@ -88,6 +90,7 @@ namespace AutoHotInterception.DeviceHandlers
public void SetContextCallback(dynamic callback)
{
ContextCallback = callback;
IsFiltered = true;
}
public override void ProcessStroke(ManagedWrapper.Stroke stroke)

@ -108,7 +108,6 @@ namespace AutoHotInterception
var handler = (KeyboardHandler)DeviceHandlers[id];
handler.SubscribeKey(code, new MappingOptions { Block = block, Concurrent = concurrent, Callback = callback });
SetDeviceFilterState(id, true);
SetFilterState(true);
SetThreadState(true);
}
@ -145,15 +144,6 @@ namespace AutoHotInterception
var handler = (KeyboardHandler)DeviceHandlers[id];
handler.SubscribeKeyboard(new MappingOptions { Block = block, Concurrent = concurrent, Callback = callback });
// ---
KeyboardMappings.TryAdd(id, new MappingOptions { Block = block, Concurrent = concurrent, Callback = callback });
if (!concurrent)
{
DeviceWorkerThreads.TryAdd(id, new WorkerThread());
DeviceWorkerThreads[id].Start();
}
SetDeviceFilterState(id, true);
SetFilterState(true);
SetThreadState(true);
}

Loading…
Cancel
Save