diff --git a/src/nvda_voicemeeter/builder.py b/src/nvda_voicemeeter/builder.py index 3cfc647..1218dda 100644 --- a/src/nvda_voicemeeter/builder.py +++ b/src/nvda_voicemeeter/builder.py @@ -271,7 +271,7 @@ class Builder: """tab3 row represents bus composite toggle""" def add_strip_outputs(layout): - layout.append([psg.Button(f"COMPOSITE", size=(16, 2), key=f"BUS {i}||COMPOSITE")]) + layout.append([psg.Button(f"BUSMODE", size=(16, 2), key=f"BUS {i}||MODE")]) buses = list() [step(buses) for step in (add_strip_outputs,)] diff --git a/src/nvda_voicemeeter/models.py b/src/nvda_voicemeeter/models.py index 2427901..89352b1 100644 --- a/src/nvda_voicemeeter/models.py +++ b/src/nvda_voicemeeter/models.py @@ -27,4 +27,4 @@ def _make_output_cache(vm) -> dict: def _make_bus_mode_cache(vm) -> dict: - return {**{f"BUS {i}||COMPOSITE": vm.bus[i].mode.get() for i in range(vm.kind.num_bus)}} + return {**{f"BUS {i}||MODE": vm.bus[i].mode.get() for i in range(vm.kind.num_bus)}} diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index a02193b..09b7e16 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -37,7 +37,7 @@ class NVDAVMWindow(psg.Window): self[f"HARDWARE OUT||A{i + 1}"].Widget.config(**buttonmenu_opts) if self.kind.name != "basic": [self[f"PATCH COMPOSITE||PC{i + 1}"].Widget.config(**buttonmenu_opts) for i in range(self.kind.phys_out)] - self["ASIO BUFFER"].Widget.config(**buttonmenu_opts) + self["ASIO BUFFER"].Widget.config(**buttonmenu_opts) self.register_events() self.current_focus = None @@ -92,15 +92,15 @@ class NVDAVMWindow(psg.Window): self[f"STRIP {i}||B{j + 1}"].bind("", "||FOCUS IN") self[f"STRIP {i}||B{j + 1}"].bind("", "||KEY ENTER") - # Bus Composites + # Bus Modes for i in range(self.kind.num_bus): - self[f"BUS {i}||COMPOSITE"].bind("", "||FOCUS IN") - self["ASIO BUFFER"].bind("", "||KEY ENTER") + self[f"BUS {i}||MODE"].bind("", "||FOCUS IN") # ASIO Buffer - self["ASIO BUFFER"].bind("", "||FOCUS IN") - self["ASIO BUFFER"].bind("", "||KEY SPACE", propagate=False) - self["ASIO BUFFER"].bind("", "||KEY ENTER", propagate=False) + if self.kind.name != "basic": + self["ASIO BUFFER"].bind("", "||FOCUS IN") + self["ASIO BUFFER"].bind("", "||KEY SPACE", propagate=False) + self["ASIO BUFFER"].bind("", "||KEY ENTER", propagate=False) def run(self): """ @@ -246,8 +246,8 @@ class NVDAVMWindow(psg.Window): case [["STRIP", index], [output], ["KEY", "ENTER"]]: self.find_element_with_focus().click() - # Bus composite - case [["BUS", index], ["COMPOSITE"]]: + # Bus modes + case [["BUS", index], ["MODE"]]: val = self.cache["busmode"][event] if val != "normal": self.vm.bus[int(index)].mode.normal = True @@ -261,10 +261,10 @@ class NVDAVMWindow(psg.Window): self.nvda.speak, f"BUS {index} {label if label else ''} bus mode {self.cache['busmode'][event]}", ) - case [["BUS", index], ["COMPOSITE"], ["FOCUS", "IN"]]: + case [["BUS", index], ["MODE"], ["FOCUS", "IN"]]: label = self.vm.bus[int(index)].label self.nvda.speak( - f"BUS {index} {label if label else ''} bus mode {self.cache['busmode'][f'BUS {index}||COMPOSITE']}" + f"BUS {index} {label if label else ''} bus mode {self.cache['busmode'][f'BUS {index}||MODE']}" ) # Unknown