diff --git a/src/nvda_voicemeeter/builder.py b/src/nvda_voicemeeter/builder.py index 959c41d..cf7549b 100644 --- a/src/nvda_voicemeeter/builder.py +++ b/src/nvda_voicemeeter/builder.py @@ -325,12 +325,18 @@ class Builder: """tab3 row represents bus composite toggle""" def add_strip_outputs(layout): + params = ["MONO", "EQ", "MUTE", "MODE"] + if self.vm.kind.name == "basic": + params.remove("EQ") + label = {"MODE": "BUSMODE"} layout.append( [ - psg.Button("Mono", size=(6, 2), key=f"BUS {i}||MONO"), - psg.Button("EQ", size=(6, 2), key=f"BUS {i}||EQ"), - psg.Button("Mute", size=(6, 2), key=f"BUS {i}||MUTE"), - psg.Button(f"BUSMODE", size=(12, 2), key=f"BUS {i}||MODE"), + psg.Button( + label.get(param, param.capitalize()), + size=(12 if param == "MODE" else 6, 2), + key=f"BUS {i}||{param}", + ) + for param in params ] ) diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index 90f0b96..cffbf9e 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -185,8 +185,11 @@ class NVDAVMWindow(psg.Window): self[f"STRIP {i}||{param}"].bind("", "||KEY ENTER") # Bus Params + params = ["MONO", "EQ", "MUTE", "MODE"] + if self.vm.kind.name == "basic": + params.remove("EQ") for i in range(self.kind.num_bus): - for param in ("MONO", "EQ", "MUTE", "MODE"): + for param in params: self[f"BUS {i}||{param}"].bind("", "||FOCUS IN") self[f"BUS {i}||{param}"].bind("", "||KEY ENTER") @@ -583,7 +586,7 @@ class NVDAVMWindow(psg.Window): f"{label} bus {param} {'on' if val else 'off'}", ) case "MODE": - bus_modes = get_bus_modes() + bus_modes = get_bus_modes(self.vm) next_index = bus_modes.index(val) + 1 if next_index == len(bus_modes): next_index = 0