Topics

Intercepting focus events/speech commands in a global add-on?

Alex Hall
 

Hello all,
I'm poking around NVDA to see if an idea for a plugin might work. It seemed easier to modify the source directly, but I don't have VS2019 installed and had a hard time getting a different project to compile using an older version of VS. If I can do this in an add-on instead, it might be easier. I'm just not sure if I can.

What I want to do is intercept NVDA's speaking of certain controls anytime a control of one of the types specified gains focus. I want to allow the user to customize the order of information for the control, then set up the speechSequence object to use the order the user specified. VoiceOver does this, and it's a feature I've long wanted in NVDA. For instance, you might want to hear "I agree, checkbox checked", but I might want "checked I agree checkbox".

I've found speech > __init__.py > getObjectPropertiesSpeech(), where the speech sequence is set up for a control, and I think replacing that would be the best way to go. However, as nothing in that file is in a class, I can't just override the function I want in a custom class. Even if I could, I don't know how to make my plug-in fire when it should.

The add-on guide talks about global add-ons with a focus on key bindings that run custom code. It also talks about app modules that use events to customize behavior. I want to combine the two, customizing behavior on specific events, but doing so globally.

Am I better off forking NVDA itself, or is there a way to do this in add-ons that I'm overlooking? Thanks.

--
Alex Hall
Automatic Distributors, IT department
ahall@...

 

Hi,

There has been numerous requests on GitHub to do just that. For now the best (and hacky) way is creating a custom function and overriding speech.getPropertiesSpeech and getPropertiesBraille (you need to do both for consistency).

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Alex Hall
Sent: Sunday, March 1, 2020 5:38 AM
To: nvda-devel@groups.io
Subject: [nvda-devel] Intercepting focus events/speech commands in a global add-on?

 

Hello all,

I'm poking around NVDA to see if an idea for a plugin might work. It seemed easier to modify the source directly, but I don't have VS2019 installed and had a hard time getting a different project to compile using an older version of VS. If I can do this in an add-on instead, it might be easier. I'm just not sure if I can.

 

What I want to do is intercept NVDA's speaking of certain controls anytime a control of one of the types specified gains focus. I want to allow the user to customize the order of information for the control, then set up the speechSequence object to use the order the user specified. VoiceOver does this, and it's a feature I've long wanted in NVDA. For instance, you might want to hear "I agree, checkbox checked", but I might want "checked I agree checkbox".

 

I've found speech > __init__.py > getObjectPropertiesSpeech(), where the speech sequence is set up for a control, and I think replacing that would be the best way to go. However, as nothing in that file is in a class, I can't just override the function I want in a custom class. Even if I could, I don't know how to make my plug-in fire when it should.

 

The add-on guide talks about global add-ons with a focus on key bindings that run custom code. It also talks about app modules that use events to customize behavior. I want to combine the two, customizing behavior on specific events, but doing so globally.

 

Am I better off forking NVDA itself, or is there a way to do this in add-ons that I'm overlooking? Thanks.


--

Alex Hall

Automatic Distributors, IT department

ahall@...

Reef Turner
 

Doing this well is quite a large project. I should note that we are gradually working towards making this easier, but there is still much to go. It is listed as one of the projects for this years Google Summer of Code program. I don’t think a single person could get it finished in that time, but they could provide some very useful insight via a prototype, or insight into a good UI for controlling the order.

 

From: nvda-devel@groups.io On Behalf Of Joseph Lee
Sent: Sunday, 1 March 2020 8:12 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] Intercepting focus events/speech commands in a global add-on?

 

Hi,

There has been numerous requests on GitHub to do just that. For now the best (and hacky) way is creating a custom function and overriding speech.getPropertiesSpeech and getPropertiesBraille (you need to do both for consistency).

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Alex Hall
Sent: Sunday, March 1, 2020 5:38 AM
To: nvda-devel@groups.io
Subject: [nvda-devel] Intercepting focus events/speech commands in a global add-on?

 

Hello all,

I'm poking around NVDA to see if an idea for a plugin might work. It seemed easier to modify the source directly, but I don't have VS2019 installed and had a hard time getting a different project to compile using an older version of VS. If I can do this in an add-on instead, it might be easier. I'm just not sure if I can.

 

What I want to do is intercept NVDA's speaking of certain controls anytime a control of one of the types specified gains focus. I want to allow the user to customize the order of information for the control, then set up the speechSequence object to use the order the user specified. VoiceOver does this, and it's a feature I've long wanted in NVDA. For instance, you might want to hear "I agree, checkbox checked", but I might want "checked I agree checkbox".

 

I've found speech > __init__.py > getObjectPropertiesSpeech(), where the speech sequence is set up for a control, and I think replacing that would be the best way to go. However, as nothing in that file is in a class, I can't just override the function I want in a custom class. Even if I could, I don't know how to make my plug-in fire when it should.

 

The add-on guide talks about global add-ons with a focus on key bindings that run custom code. It also talks about app modules that use events to customize behavior. I want to combine the two, customizing behavior on specific events, but doing so globally.

 

Am I better off forking NVDA itself, or is there a way to do this in add-ons that I'm overlooking? Thanks.


--

Alex Hall

Automatic Distributors, IT department

ahall@...

Alex Hall
 

Is the project you're referring to my control customization idea, or making it so add-ons can hook into these events?

On Wed, Mar 4, 2020 at 11:11 AM Reef Turner <reef@...> wrote:

Doing this well is quite a large project. I should note that we are gradually working towards making this easier, but there is still much to go. It is listed as one of the projects for this years Google Summer of Code program. I don’t think a single person could get it finished in that time, but they could provide some very useful insight via a prototype, or insight into a good UI for controlling the order.

 

From: nvda-devel@groups.io On Behalf Of Joseph Lee
Sent: Sunday, 1 March 2020 8:12 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] Intercepting focus events/speech commands in a global add-on?

 

Hi,

There has been numerous requests on GitHub to do just that. For now the best (and hacky) way is creating a custom function and overriding speech.getPropertiesSpeech and getPropertiesBraille (you need to do both for consistency).

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Alex Hall
Sent: Sunday, March 1, 2020 5:38 AM
To: nvda-devel@groups.io
Subject: [nvda-devel] Intercepting focus events/speech commands in a global add-on?

 

Hello all,

I'm poking around NVDA to see if an idea for a plugin might work. It seemed easier to modify the source directly, but I don't have VS2019 installed and had a hard time getting a different project to compile using an older version of VS. If I can do this in an add-on instead, it might be easier. I'm just not sure if I can.

 

What I want to do is intercept NVDA's speaking of certain controls anytime a control of one of the types specified gains focus. I want to allow the user to customize the order of information for the control, then set up the speechSequence object to use the order the user specified. VoiceOver does this, and it's a feature I've long wanted in NVDA. For instance, you might want to hear "I agree, checkbox checked", but I might want "checked I agree checkbox".

 

I've found speech > __init__.py > getObjectPropertiesSpeech(), where the speech sequence is set up for a control, and I think replacing that would be the best way to go. However, as nothing in that file is in a class, I can't just override the function I want in a custom class. Even if I could, I don't know how to make my plug-in fire when it should.

 

The add-on guide talks about global add-ons with a focus on key bindings that run custom code. It also talks about app modules that use events to customize behavior. I want to combine the two, customizing behavior on specific events, but doing so globally.

 

Am I better off forking NVDA itself, or is there a way to do this in add-ons that I'm overlooking? Thanks.


--

Alex Hall

Automatic Distributors, IT department

ahall@...



--
Alex Hall
Automatic Distributors, IT department
ahall@...

Bill Dengler
 

Control customization. 

Bill


On Mar 4, 2020, at 11:39, Alex Hall <ahall@...> wrote:


Is the project you're referring to my control customization idea, or making it so add-ons can hook into these events?

On Wed, Mar 4, 2020 at 11:11 AM Reef Turner <reef@...> wrote:

Doing this well is quite a large project. I should note that we are gradually working towards making this easier, but there is still much to go. It is listed as one of the projects for this years Google Summer of Code program. I don’t think a single person could get it finished in that time, but they could provide some very useful insight via a prototype, or insight into a good UI for controlling the order.

 

From: nvda-devel@groups.io On Behalf Of Joseph Lee
Sent: Sunday, 1 March 2020 8:12 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] Intercepting focus events/speech commands in a global add-on?

 

Hi,

There has been numerous requests on GitHub to do just that. For now the best (and hacky) way is creating a custom function and overriding speech.getPropertiesSpeech and getPropertiesBraille (you need to do both for consistency).

Cheers,

Joseph

 

From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Alex Hall
Sent: Sunday, March 1, 2020 5:38 AM
To: nvda-devel@groups.io
Subject: [nvda-devel] Intercepting focus events/speech commands in a global add-on?

 

Hello all,

I'm poking around NVDA to see if an idea for a plugin might work. It seemed easier to modify the source directly, but I don't have VS2019 installed and had a hard time getting a different project to compile using an older version of VS. If I can do this in an add-on instead, it might be easier. I'm just not sure if I can.

 

What I want to do is intercept NVDA's speaking of certain controls anytime a control of one of the types specified gains focus. I want to allow the user to customize the order of information for the control, then set up the speechSequence object to use the order the user specified. VoiceOver does this, and it's a feature I've long wanted in NVDA. For instance, you might want to hear "I agree, checkbox checked", but I might want "checked I agree checkbox".

 

I've found speech > __init__.py > getObjectPropertiesSpeech(), where the speech sequence is set up for a control, and I think replacing that would be the best way to go. However, as nothing in that file is in a class, I can't just override the function I want in a custom class. Even if I could, I don't know how to make my plug-in fire when it should.

 

The add-on guide talks about global add-ons with a focus on key bindings that run custom code. It also talks about app modules that use events to customize behavior. I want to combine the two, customizing behavior on specific events, but doing so globally.

 

Am I better off forking NVDA itself, or is there a way to do this in add-ons that I'm overlooking? Thanks.


--

Alex Hall

Automatic Distributors, IT department

ahall@...



--
Alex Hall
Automatic Distributors, IT department
ahall@...