nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
Other
2.09k stars 628 forks source link

Add a keyboard shortcut to start NVDA with add-ons disabled #17210

Open SaschaCowley opened 6 days ago

SaschaCowley commented 6 days ago

Is your feature request related to a problem? Please describe.

When an add-on causes NVDA to stop working, users currently have no straightforward way to diagnose and resolve the issue. This can lead to frustration and a significant disruption in their workflow. Although NVDA already has a “Restart with Add-ons Disabled” option, it is not accessible if NVDA is not working. Add-ons can also be disabled from the command line using the --disable-addons flag, but this method is not user-friendly for most users. Additionally, uninstalling and reinstalling NVDA won’t resolve the issue unless issue #6869 or issue #9596 are implemented.

Describe the solution you'd like

Implement a keyboard shortcut to restart NVDA with add-ons disabled. This could be augmented to be a “safe mode” feature if the default, or a known safe, configuration was to be used. This mode would enable users to troubleshoot and identify problematic add-ons without affecting the core functionality of NVDA. Similar to Firefox’s “Restart with Add-ons Disabled” option, this feature would provide a simple and effective way to resolve issues caused by add-ons. A convenient way to activate this feature could be by holding the Shift key while launching NVDA, or through a similar mechanism.

Describe alternatives you've considered

  1. Manual Add-on Management: Users could manually disable each add-on through the NVDA settings, but this process is time-consuming and requires NVDA to be functional enough to access the settings.
  2. Reinstallation: Users could uninstall and reinstall NVDA, but this is a more drastic measure that can be inconvenient and time-consuming, and won’t work unless issue #6869 or issue #9596 are implemented.
  3. Code hardening: Tighten up NVDA to catch and recover from all exceptions. While theoretically a good idea, this would be technically almost impossible. It also wouldn't solve all potential issues, as add-ons could still break NVDA without causing exceptions (for example, by intercepting and blocking all speech and/or braille output commands).

Additional context

Restarting with add-ons disabled is already implemented, it is just not accessible if NVDA is not working or the user is not comfortable passing command line arguments to NVDA.

This approach is inspired by similar features in other software, such as Firefox and Audacity, which provide users with a straightforward way to troubleshoot issues caused by extensions or plugins.

There are several issues that would have to be considered when implementing this feature. These include:

nvdaes commented 5 days ago

This may be also very useful for new developers. Years ago I needed to go to my computer distributors so they could help me to make NVDA to work during add-on development, or tried to remove all add-ons by running %appdata%\nvda\addons.

hwf1324 commented 3 days ago

Can we add a desktop shortcut icon with the --disable-addons command line argument to fix this?

The principle is to configure the system shortcuts in the properties of the desktop icon just like the Ctrl+Alt+N shortcut for launching NVDA.

This has the advantage of avoiding NVDA not responding to shortcuts that disable addon restarts. (Of course by then NVDA's keyboard hook may have blocked keyboard input.)

Even this approach can be extended to other command line parameters, such as starting NVDA with a temporary empty configuration to use the default configuration.

Users can be asked during the installation of NVDA if they want to create these desktop shortcut icons.