Add extension points to eliminate NVDA Remote monkey patching#9917
Add extension points to eliminate NVDA Remote monkey patching#9917LeonarddeR wants to merge 1 commit into
Conversation
* inputCore.manager.decide_executeGesture: Decider for filtering gestures * tones.decide_beep * nvwave.decide_playWaveFile Add extension points to filter the enabled state of the braille handler as well as filter and process the cells written to a braille display
|
Investigating the NVDA Remote source code and the possible upgrade path to Python 3, I discovered that some additional extension points could be considered. Here is a quick run down of my ideas, particularly for @feerrenrut
NVDARemote on python 2 does al sorts of stuff with monkey patching synthDriverHandler.getSynth, in order to be able to monkeypatch the synthesizer driver. This should no longer be necessary, neither if NVDARemote is converted to Python 3 without implementing extension points in NVDA. In the latter case however, it might be better to monkeypatch speech._manager.speak and speech._manager.cancel instead. |
|
Hi @LeonarddeR,
Will this involve yet another synthdriver changes?
|
|
Nope, it's not necessary to change synth drivers again. Note that this
pr is just a prototype.
|
|
This has always been a draft. As this was only a reference pr and nvda remote 2.3 for python 3 works ok for now, I"m closing this. |
…I consumers (#14503) Replaces #9917 Summary of the issue: Tools like NVDA remote that need to intercept speech and braille output currently rely on monkeypatching to do this. Description of user facing changes It is no longer possible to override the display size of the braille handler by setting braille.handler.displaySize. It is also no longer possible to enable/disable the handler by setting braille.handler.enabled. Description of development approach Added the following extension points: inputCore.manager.decide_executeGesture: Decider for filtering gestures tones.decide_beep nvwave.decide_playWaveFile braille.handler.pre_writeCells braille.handler.filter_displaySize braille.handler.decide_enabled braille.handler.displayChange braille.handler.displaySizeChanged This means that NVDA Remote and similar tools can at least drop all monkeypatching related to braille, playing tones and waves. Speech is a separate subject and will be handled in a follow up.
Link to issue number:
None. Some discussion around #7484 (comment) though
Follow up of #7594, now in draft form
Summary of the issue:
NVDA Remote requires monkey patching to be notified of several actions on a controlled system (e.g. selecting a braille display or playing beeps).
Description of how this pull request fixes the issue:
Implemented the following extension points: