From 6896358071f4fa4f0baea0e7eb9a9529774d5d36 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Tue, 22 Aug 2023 18:13:26 +0100 Subject: [PATCH] register events for INSERT CHECKBOX --- src/nvda_voicemeeter/window.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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): """