toggle quoted messageShow quoted text
It works! In order to avoid duplicated speech, it quits event callbacks chain by not calling nextHandler. Might affect other addons, but I still do not need to care about that since it's currently an experimental phase.
Thank you very much!
On 2021/09/12 15:05, Noelia Ruiz wrote:
Hello, you may do something like this (tested inscratchpad:
from speech.commands import PitchCommand
def event_gainFocus(self, obj, nextHandler):
Please see the new speech.commands.py module, speech.speakObject and
speech.speakObjectProperties methods. Also you can see
speech.sayAll.py to see how the CallBack command canbe implemented
2021-09-11 18:11 GMT+02:00, Yukio Nozawa <email@example.com>:
I want to hook the focus change event, see the new control's role and
insert additional speech command sequence so that I can control how the
focused control is announced. It's like more generalized version of
"Beep before cap" where that specific function is handled manually
inside the speech module.
I haven't involved in NVDA addon development for several years. I still
remember that I can set a callback for focus change event, but not sure
if it's possible to insert speech command values and pass them to the
actual speech.speak(speechSequence) call.
speech.getObjectPropertiesSpeech seems to be generating speech sequence
for focused object, but I don't know if intercepting this function is
Any tips for implementing this? Has anyone tried to do similar tweeks?
Faculty of Environment and Information Studies
Jun Murai Laboratory. KUMO Research Group
personal e-mail: firstname.lastname@example.org