Changing the behavior of left and right arrows?


Meisam Amini <meisamamini21@...>
 

Hello.

I'm severely hearing impaired in addition to being blind, and use phonetic equivalent of letters a lot. But NVDA's phonetic announcement feature isn't really enough for me and I have to constantly double-press numpad2 to hear the phonetic word for a letter.

I have been trying to write an add-on to bring the behavior of JAWS and TalkBack to NVDA, that is, announcing the phonetic equivalent of a letter after a pause. I've been able to do this for the review cursor by copying the scripts for numpad1, numpad2, and numpad3 keys from globalCommands.py module into my global plug-in and modifying them. But as much as I try, I can't find a way to do the same for left and right arrows.

After searching for a while, I found a script in cursorManager.py for left and right arrows, but they just run a method inside cursorManager.py and I can't replace that method. Any ideas?

Thanks in advance for any help.


Chris
 

Or you could save yourself all the trouble and download the enhanced phonetic reading add-on

 

https://github.com/davidacm/EnhancedPhoneticReading/releases/tag/0.5a2

 

 

 

From: Meisam Amini
Sent: 21 November 2021 19:55
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] Changing the behavior of left and right arrows?

 

Hello.

I'm severely hearing impaired in addition to being blind, and use phonetic equivalent of letters a lot. But NVDA's phonetic announcement feature isn't really enough for me and I have to constantly double-press numpad2 to hear the phonetic word for a letter.

I have been trying to write an add-on to bring the behavior of JAWS and TalkBack to NVDA, that is, announcing the phonetic equivalent of a letter after a pause. I've been able to do this for the review cursor by copying the scripts for numpad1, numpad2, and numpad3 keys from globalCommands.py module into my global plug-in and modifying them. But as much as I try, I can't find a way to do the same for left and right arrows.

After searching for a while, I found a script in cursorManager.py for left and right arrows, but they just run a method inside cursorManager.py and I can't replace that method. Any ideas?

Thanks in advance for any help.

 


Tony Malykh
 

This should be doable. In my wordNav add-on I override Control+Left/Right keystrokes. You can look into its source code for an example:
https://github.com/mltony/nvda-word-nav/
You can start looking at def injectHooks - this is where I monkey patch NVDA methods. Note, there are two places you'd need to monkey patch: in cursorManager for browse mode and in EditableText for edit boxes.
HTH

--Tony


On 11/21/2021 8:28 AM, Meisam Amini wrote:
Hello.

I'm severely hearing impaired in addition to being blind, and use phonetic equivalent of letters a lot. But NVDA's phonetic announcement feature isn't really enough for me and I have to constantly double-press numpad2 to hear the phonetic word for a letter.

I have been trying to write an add-on to bring the behavior of JAWS and TalkBack to NVDA, that is, announcing the phonetic equivalent of a letter after a pause. I've been able to do this for the review cursor by copying the scripts for numpad1, numpad2, and numpad3 keys from globalCommands.py module into my global plug-in and modifying them. But as much as I try, I can't find a way to do the same for left and right arrows.

After searching for a while, I found a script in cursorManager.py for left and right arrows, but they just run a method inside cursorManager.py and I can't replace that method. Any ideas?

Thanks in advance for any help.


Meisam Amini <meisamamini21@...>
 

Thank you. I think I can work with this.

All the best.

On Mon, Nov 22, 2021 at 4:03 AM Tony Malykh <anton.malykh@...> wrote:

This should be doable. In my wordNav add-on I override Control+Left/Right keystrokes. You can look into its source code for an example:
https://github.com/mltony/nvda-word-nav/
You can start looking at def injectHooks - this is where I monkey patch NVDA methods. Note, there are two places you'd need to monkey patch: in cursorManager for browse mode and in EditableText for edit boxes.
HTH

--Tony


On 11/21/2021 8:28 AM, Meisam Amini wrote:
Hello.

I'm severely hearing impaired in addition to being blind, and use phonetic equivalent of letters a lot. But NVDA's phonetic announcement feature isn't really enough for me and I have to constantly double-press numpad2 to hear the phonetic word for a letter.

I have been trying to write an add-on to bring the behavior of JAWS and TalkBack to NVDA, that is, announcing the phonetic equivalent of a letter after a pause. I've been able to do this for the review cursor by copying the scripts for numpad1, numpad2, and numpad3 keys from globalCommands.py module into my global plug-in and modifying them. But as much as I try, I can't find a way to do the same for left and right arrows.

After searching for a while, I found a script in cursorManager.py for left and right arrows, but they just run a method inside cursorManager.py and I can't replace that method. Any ideas?

Thanks in advance for any help.


Meisam Amini <meisamamini21@...>
 

Tried it. It doesn't work with the latest version of NVDA.


On Mon, Nov 22, 2021 at 12:07 AM Chris via groups.io <chrismedley=btinternet.com@groups.io> wrote:

Or you could save yourself all the trouble and download the enhanced phonetic reading add-on

 

https://github.com/davidacm/EnhancedPhoneticReading/releases/tag/0.5a2

 

 

 

From: Meisam Amini
Sent: 21 November 2021 19:55
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] Changing the behavior of left and right arrows?

 

Hello.

I'm severely hearing impaired in addition to being blind, and use phonetic equivalent of letters a lot. But NVDA's phonetic announcement feature isn't really enough for me and I have to constantly double-press numpad2 to hear the phonetic word for a letter.

I have been trying to write an add-on to bring the behavior of JAWS and TalkBack to NVDA, that is, announcing the phonetic equivalent of a letter after a pause. I've been able to do this for the review cursor by copying the scripts for numpad1, numpad2, and numpad3 keys from globalCommands.py module into my global plug-in and modifying them. But as much as I try, I can't find a way to do the same for left and right arrows.

After searching for a while, I found a script in cursorManager.py for left and right arrows, but they just run a method inside cursorManager.py and I can't replace that method. Any ideas?

Thanks in advance for any help.

 


Cagri Dogan
 

I’ve a working copy here with NVDA’s last alpha. I can send it privately if you want.

 

Kimden: Meisam Amini
Gönderilme: 22 Kasım 2021 Pazartesi 13:10
Kime: nvda-addons@nvda-addons.groups.io
Konu: Re: [nvda-addons] Changing the behavior of left and right arrows?

 

Tried it. It doesn't work with the latest version of NVDA.

 

On Mon, Nov 22, 2021 at 12:07 AM Chris via groups.io <chrismedley=btinternet.com@groups.io> wrote:

Or you could save yourself all the trouble and download the enhanced phonetic reading add-on

 

https://github.com/davidacm/EnhancedPhoneticReading/releases/tag/0.5a2

 

 

 

From: Meisam Amini
Sent: 21 November 2021 19:55
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] Changing the behavior of left and right arrows?

 

Hello.

I'm severely hearing impaired in addition to being blind, and use phonetic equivalent of letters a lot. But NVDA's phonetic announcement feature isn't really enough for me and I have to constantly double-press numpad2 to hear the phonetic word for a letter.

I have been trying to write an add-on to bring the behavior of JAWS and TalkBack to NVDA, that is, announcing the phonetic equivalent of a letter after a pause. I've been able to do this for the review cursor by copying the scripts for numpad1, numpad2, and numpad3 keys from globalCommands.py module into my global plug-in and modifying them. But as much as I try, I can't find a way to do the same for left and right arrows.

After searching for a while, I found a script in cursorManager.py for left and right arrows, but they just run a method inside cursorManager.py and I can't replace that method. Any ideas?

Thanks in advance for any help.

 

 


Chris
 

All you need to do is to modify the manifest to make it compatible with the latest nvda

 

 

 

From: Meisam Amini
Sent: 22 November 2021 10:19
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Changing the behavior of left and right arrows?

 

Tried it. It doesn't work with the latest version of NVDA.

 

On Mon, Nov 22, 2021 at 12:07 AM Chris via groups.io <chrismedley=btinternet.com@groups.io> wrote:

Or you could save yourself all the trouble and download the enhanced phonetic reading add-on

 

https://github.com/davidacm/EnhancedPhoneticReading/releases/tag/0.5a2

 

 

 

From: Meisam Amini
Sent: 21 November 2021 19:55
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] Changing the behavior of left and right arrows?

 

Hello.

I'm severely hearing impaired in addition to being blind, and use phonetic equivalent of letters a lot. But NVDA's phonetic announcement feature isn't really enough for me and I have to constantly double-press numpad2 to hear the phonetic word for a letter.

I have been trying to write an add-on to bring the behavior of JAWS and TalkBack to NVDA, that is, announcing the phonetic equivalent of a letter after a pause. I've been able to do this for the review cursor by copying the scripts for numpad1, numpad2, and numpad3 keys from globalCommands.py module into my global plug-in and modifying them. But as much as I try, I can't find a way to do the same for left and right arrows.

After searching for a while, I found a script in cursorManager.py for left and right arrows, but they just run a method inside cursorManager.py and I can't replace that method. Any ideas?

Thanks in advance for any help.