Check for sequence after track
This commit is contained in:
@@ -687,6 +687,18 @@ namespace DD2Switcher {
|
|||||||
Console.WriteLine($"Current sequence keybind: {SequenceKeybind}");
|
Console.WriteLine($"Current sequence keybind: {SequenceKeybind}");
|
||||||
Console.WriteLine($"Key codes - Pressed: {(int)e.Key}, Expected: {(int)SequenceKeybind}");
|
Console.WriteLine($"Key codes - Pressed: {(int)e.Key}, Expected: {(int)SequenceKeybind}");
|
||||||
|
|
||||||
|
// Cancel sequence mode on any manual window switching
|
||||||
|
if (CurrentState != SequenceState.INACTIVE && e.Modifiers == KeyModifiers.Alt) {
|
||||||
|
Console.WriteLine("Manual window switching detected, cancelling sequence mode");
|
||||||
|
ExitSequenceMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e.Key == Keys.Oemtilde && e.Modifiers == KeyModifiers.Alt && IsCapsLockOn()) {
|
||||||
|
TrackProcess();
|
||||||
|
ToggleCapsLock();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Check for sequence mode keybind
|
// Check for sequence mode keybind
|
||||||
Console.WriteLine(
|
Console.WriteLine(
|
||||||
$"Checking sequence keybind - Key: {e.Key} == {SequenceKeybind} = {e.Key == SequenceKeybind}");
|
$"Checking sequence keybind - Key: {e.Key} == {SequenceKeybind} = {e.Key == SequenceKeybind}");
|
||||||
@@ -706,17 +718,6 @@ namespace DD2Switcher {
|
|||||||
$"Sequence keybind check failed - Key match: {e.Key == SequenceKeybind}, Modifiers match: {e.Modifiers == KeyModifiers.NoRepeat}");
|
$"Sequence keybind check failed - Key match: {e.Key == SequenceKeybind}, Modifiers match: {e.Modifiers == KeyModifiers.NoRepeat}");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cancel sequence mode on any manual window switching
|
|
||||||
if (CurrentState != SequenceState.INACTIVE && e.Modifiers == KeyModifiers.Alt) {
|
|
||||||
Console.WriteLine("Manual window switching detected, cancelling sequence mode");
|
|
||||||
ExitSequenceMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.Key == Keys.Oemtilde && e.Modifiers == KeyModifiers.Alt && IsCapsLockOn()) {
|
|
||||||
TrackProcess();
|
|
||||||
ToggleCapsLock();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int index;
|
int index;
|
||||||
if (e.Key >= Keys.D0 && e.Key <= Keys.D9) {
|
if (e.Key >= Keys.D0 && e.Key <= Keys.D9) {
|
||||||
|
Reference in New Issue
Block a user