diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index e589169..8f70254 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -34,9 +34,22 @@ class Window(psg.Window): def register_events(self): for i in range(1, self.vm.kind.phys_out + 1): self[f"HARDWARE OUT||A{i}"].bind("", "||FOCUS IN") - for i in range(1, 6): + for i in range(1, self.kind.phys_out + 1): self[f"ASIO CHECKBOX||IN{i} 0"].bind("", "||FOCUS IN") self[f"ASIO CHECKBOX||IN{i} 1"].bind("", "||FOCUS IN") + for i in range(1, self.kind.num_strip + 1): + if i <= self.kind.phys_in: + self[f"INSERT CHECKBOX||IN{i} 0"].bind("", "||FOCUS IN") + self[f"INSERT CHECKBOX||IN{i} 1"].bind("", "||FOCUS IN") + else: + self[f"INSERT CHECKBOX||IN{i} 0"].bind("", "||FOCUS IN") + self[f"INSERT CHECKBOX||IN{i} 1"].bind("", "||FOCUS IN") + self[f"INSERT CHECKBOX||IN{i} 2"].bind("", "||FOCUS IN") + self[f"INSERT CHECKBOX||IN{i} 3"].bind("", "||FOCUS IN") + self[f"INSERT CHECKBOX||IN{i} 4"].bind("", "||FOCUS IN") + self[f"INSERT CHECKBOX||IN{i} 5"].bind("", "||FOCUS IN") + self[f"INSERT CHECKBOX||IN{i} 6"].bind("", "||FOCUS IN") + self[f"INSERT CHECKBOX||IN{i} 7"].bind("", "||FOCUS IN") def run(self): """