diff --git a/src/nvda_voicemeeter/util.py b/src/nvda_voicemeeter/util.py index 23f4c84..7c3cb32 100644 --- a/src/nvda_voicemeeter/util.py +++ b/src/nvda_voicemeeter/util.py @@ -178,3 +178,17 @@ def get_full_slider_params(i, kind) -> Iterable: if kind.name == "basic": params.remove("LIMIT") return params + + +def get_slider_modes() -> Iterable: + return ( + "GAIN MODE", + "BASS MODE", + "MID MODE", + "TREBLE MODE", + "AUDIBILITY MODE", + "COMP MODE", + "GATE MODE", + "DENOISER MODE", + "LIMIT MODE", + ) diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index 87a5870..f42e86d 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -304,13 +304,15 @@ class NVDAVMWindow(psg.Window): self.logger.debug(f"values::{values}") if event in (psg.WIN_CLOSED, "Exit"): break - elif not event.startswith("BUS") and event.endswith("MODE"): + elif event in util.get_slider_modes(): mode = event self.nvda.speak(f"{mode} enabled") + self.logger.debug(f"entered slider mode {mode}") continue elif event == "ESCAPE": if mode: self.nvda.speak(f"{mode} disabled") + self.logger.debug(f"exited from slider mode {mode}") mode = None continue