Prevent double hotkey processing in some situations https://github.com/seerge/g-helper/issues/3348

This commit is contained in:
Serge
2024-11-07 11:00:22 +01:00
parent 0a503d286a
commit 9d130ca540

View File

@@ -56,6 +56,7 @@ namespace GHelper.Input
input.ReadTimeout = int.MaxValue; input.ReadTimeout = int.MaxValue;
var data = input.Read(); var data = input.Read();
if (cancellationTokenSource.Token.IsCancellationRequested) break;
if (data.Length > 1 && data[0] == AsusHid.INPUT_ID && data[1] > 0 && data[1] != 236) if (data.Length > 1 && data[0] == AsusHid.INPUT_ID && data[1] > 0 && data[1] != 236)
{ {
Logger.WriteLine($"Key: {data[1]}"); Logger.WriteLine($"Key: {data[1]}");