diff --git a/pyproject.toml b/pyproject.toml index 51a699e..a2abb33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nvda_voicemeeter" -version = "0.5.2" +version = "0.5.3" description = "A Voicemeeter app compatible with NVDA" authors = [ { name = "onyx-and-iris", email = "code@onyxandiris.online" }, diff --git a/src/nvda_voicemeeter/builder.py b/src/nvda_voicemeeter/builder.py index 2d012d5..e08fa2b 100644 --- a/src/nvda_voicemeeter/builder.py +++ b/src/nvda_voicemeeter/builder.py @@ -202,7 +202,7 @@ class Builder: [ psg.ButtonMenu( f"PC{i + 1}", - size=(6, 2), + size=(5, 2), menu_def=["", outputs], key=f"PATCH COMPOSITE||PC{i + 1}", ) diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index 0cd0b12..6f32206 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -613,10 +613,12 @@ class NVDAVMWindow(psg.Window): else: index = int(key[-1]) - 1 comp_index = self.vm.patch.composite[index].get() - if self.kind.name == "banana": - if comp_index == 64: # bus channel - comp_index = 0 - val = util.get_patch_composite_list(self.kind)[comp_index - 1] + comp_list = util.get_patch_composite_list(self.kind) + try: + val = comp_list[comp_index - 1] + except IndexError as e: + val = comp_list[-1] + self.logger.error(f"{type(e).__name__}: {e}") self.nvda.speak(f"Patch COMPOSITE {key[-1]} {val}") case [["PATCH", "COMPOSITE"], [key], ["KEY", "SPACE" | "ENTER"]]: util.open_context_menu_for_buttonmenu(self, f"PATCH COMPOSITE||{key}")