6 Commits

Author SHA1 Message Date
e9b9295a46 removes unnecessary import 2023-09-27 21:27:10 +01:00
2db268551c adds modify bus assignment binds
to configuration section in readme
2023-09-27 21:22:34 +01:00
0be7919f12 add Bus Assignments to README 2023-09-27 21:17:58 +01:00
ab728f0a32 fix bug bind overrides 2023-09-27 19:18:52 +01:00
050e0336b8 add voicemeeter kinds to README 2023-09-27 19:09:09 +01:00
f49b04d4f6 adds Configuration section to README 2023-09-27 18:51:51 +01:00
2 changed files with 72 additions and 5 deletions

View File

@@ -4,9 +4,9 @@ Control Voicemeeter with global hotkeys.
## Install ## Install
This addon can be installed through the Add-on store, `Install from external source`. Simply download the latest Release and load it with NVDA. This addon can be installed through the Add-on store, `Install from external source`. Simply download the [latest Release](https://github.com/onyx-and-iris/nvda-addon-voicemeeter/releases) and load it with NVDA.
## Keybinds ## Default Keybinds
### Controllers ### Controllers
@@ -47,7 +47,74 @@ This addon can be installed through the Add-on store, `Install from external sou
- `NVDA+shift+c`: MC - `NVDA+shift+c`: MC
- `NVDA+shift+k`: Karaoke - `NVDA+shift+k`: Karaoke
### Bus Assignments (A1-A5|B1-B3)
- `NVDA+shift+1`: Toggle BUS assignment 1 for a strip
- `NVDA+shift+2`: Toggle BUS assignment 2 for a strip
- `NVDA+shift+3`: Toggle BUS assignment 3 for a strip
- `NVDA+shift+4`: Toggle BUS assignment 4 for a strip
- `NVDA+shift+5`: Toggle BUS assignment 5 for a strip
- `NVDA+shift+6`: Toggle BUS assignment 6 for a strip
- `NVDA+shift+7`: Toggle BUS assignment 7 for a strip
- `NVDA+shift+8`: Toggle BUS assignment 8 for a strip
### Announcements ### Announcements
- `NVDA+shift+q`: Announce current controller. - `NVDA+shift+q`: Announce current controller.
- `NVDA+shift+a`: Announce Voicemeeter kind. - `NVDA+shift+a`: Announce Voicemeeter kind.
## Configuration
By placing a file named `nvda_settings.json` in `User Home Directory / Documents / Voicemeeter` (the same place as your Voicemeeter xml profiles) you can change most of the default keybinds.
The `voicemeeter` key can take one of three values:
- `basic`
- `banana`
- `potato`
example:
```json
{
"voicemeeter": "banana",
"keybinds": {
"NVDA+alt+k": "strip_mode",
"NVDA+alt+l": "bus_mode",
"NVDA+alt+g": "gain_mode",
"NVDA+alt+c": "comp_mode",
"NVDA+alt+t": "gate_mode",
"NVDA+alt+d": "denoiser_mode",
"NVDA+alt+a": "audibility_mode",
"NVDA+shift+q": "announce_controller",
"NVDA+shift+z": "announce_voicemeeter_version",
"NVDA+shift+s": "toggle_solo",
"NVDA+shift+m": "toggle_mute",
"NVDA+shift+c": "toggle_mc",
"NVDA+shift+k": "karaoke",
"NVDA+shift+upArrow": "slider_increase_by_point_one",
"NVDA+shift+downArrow": "slider_decrease_by_point_one",
"NVDA+shift+alt+upArrow": "slider_increase_by_one",
"NVDA+shift+alt+downArrow": "slider_decrease_by_one",
"NVDA+shift+control+upArrow": "slider_increase_by_three",
"NVDA+shift+control+downArrow": "slider_decrease_by_three",
"NVDA+control+1": "bus_assignment",
"NVDA+control+2": "bus_assignment",
"NVDA+control+3": "bus_assignment",
"NVDA+control+4": "bus_assignment",
"NVDA+control+5": "bus_assignment",
"NVDA+control+6": "bus_assignment",
"NVDA+control+7": "bus_assignment",
"NVDA+control+8": "bus_assignment"
}
}
```
Would make the following changes:
- load the plugin in `banana` mode (default is potato)
- change the `strip_mode` and `bus_mode` binds to `NVDA+alt+k` and `NVDA+alt+l` respectively
- change the `announce_voicemeeter_version` bind to `NVDA+shift+z`
- changes the bus assignment binds to `NVDA+control+number`
All other binds would then be defaults.

View File

@@ -1,4 +1,4 @@
from . import config, util from . import config
from .kinds import request_kind_map from .kinds import request_kind_map
@@ -41,10 +41,10 @@ def _make_gestures(kind_id):
for i in range(1, kind.num_strip + 1): for i in range(1, kind.num_strip + 1):
defaults[f"kb:NVDA+alt+{i}"] = "index" defaults[f"kb:NVDA+alt+{i}"] = "index"
for i in range(1, kind.phys_out + kind.virt_out + 1): for i in range(1, kind.phys_out + kind.virt_out + 1):
defaults[f"kb:NVDA+alt+{i}"] = "bus_assignment" defaults[f"kb:NVDA+shift+{i}"] = "bus_assignment"
abc = config.get("keybinds") abc = config.get("keybinds")
if abc: if abc:
overrides = {f"kb:{util.remove_prefix(k, 'kb:')}": v for k, v in abc.items()} overrides = {f"kb:{remove_prefix(k, 'kb:')}": v for k, v in abc.items()}
matching_values = set(defaults.values()).intersection(set(overrides.values())) matching_values = set(defaults.values()).intersection(set(overrides.values()))
defaults = {k: v for k, v in defaults.items() if v not in matching_values} defaults = {k: v for k, v in defaults.items() if v not in matching_values}
return {**defaults, **overrides} return {**defaults, **overrides}