Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No feedback when using Backspace while typing in Kannada language using Nudi 6.1 software #15822

Closed
Qchristensen opened this issue Nov 24, 2023 · 22 comments · Fixed by #15957
Closed
Labels
app-specific p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@Qchristensen
Copy link
Member

Steps to reproduce:

Received via email

Using Nudi6.1 software. (you can download from below link.)
https://kagapa.in/kannada/sites/default/files/downloads/Nudi-6.1/Nudi_6.1_setup.exe

Type any text and then use backspace to remove any characters.

Actual behavior:

With NVDA's Keyboard setting "Handle keys from other applications" checked, user receives the following error:
"71 hotkeys have been received in the last 1812ms.
Do you want to continue?
yes no
(see #MaxHotkeysPerInterval in the help file)"

With this option disabled, the action works, however with no feedback from NVDA.

(Regarding this setting, the user guide does note that "Certain users may wish to turn this off, such as those typing Vietnamese with the UniKey typing software as it will cause incorrect character input")

The user advised that when trying the same thing with NVDA 2022.4, they do not receive the error. But when using NVDA 2023.1 or later, they do.

Expected behavior:

Ideally the user should get feedback about deleted characters, and no error.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

NVDA version:

NVDA 2023.3 installed

Windows version:

Windows 10.0.19045 Build 19045

Name and version of other software in use when reproducing the issue:

for typing Kannada, we use Nudi6.1 software. (you can download from below link.)
https://kagapa.in/kannada/sites/default/files/downloads/Nudi-6.1/Nudi_6.1_setup.exe

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Also tested with NVDA 2022.4 and NVDA 2023.1

If NVDA add-ons are disabled, is your problem still occurring?

Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

@Qchristensen
Copy link
Member Author

Qchristensen commented Nov 24, 2023

Note from the user: A workaround for this is to use shift+backspace.
Pressing control+backspace to remove by word also works

@lukaszgo1
Copy link
Contributor

My testing does not confirm the range of versions mentioned in the initial comment i.e. this does not work for me with NVDA 2023.2, and does work as expected in 2023.1. Bisect shows that this has been introduced in PR #14708

@CyrilleB79
Copy link
Collaborator

cc @jcsteh (author of #14708)

@jcsteh
Copy link
Contributor

jcsteh commented Nov 27, 2023

My guess is that Nudi6.1 captures the backspace key and then re-sends it for some reason. Previously, we delayed slightly when sending keys, which would mean that any keys sent by an app which captured a key sent by NVDA would be ignored during that period. Now that we don't delay, we only ignore the key sent by NVDA itself, but that doesn't include any keys captured and sent by, for example, Nudi6.1.

I'm not really sure what to do about this except put the delay back, but that would reintroduce a significant performance loss (15-40ms) for all users for cursor keys, backspace, etc.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 27, 2023

Actually, one thing we could try is this, as I discussed in #14708 (comment):

This sleep was apparently added to ensure NVDA's keyboard hook ignored the injected keys. In my testing, removing this didn't seem to have any negative impact. If this does turn out to be a problem, we could watch for the last injected key in the keyboard event hook and fire a Windows event when it arrives. This will be faster to wake than a 10-16 ms sleep.

I'm not convinced it'll work, but it's worth a shot. I've pushed a try build with this approach. It will arrive here soon.

@lukaszgo1
Copy link
Contributor

I was unable to test with a binary try build (as it failed to finish for some reason), but testing with the branch try-injectEvt I can confirm that the issue appears to be fixed. It would be good to get confirmation from the user who reported this initially to @Qchristensen though, just to make sure.

@Qchristensen
Copy link
Member Author

Thanks everyone! That try build doesn't seem to have build. Have you got a link to the one you got to work please?

@seanbudd seanbudd added app-specific p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. labels Nov 27, 2023
@lukaszgo1
Copy link
Contributor

I have tested running from sources. Perhaps you can just ask Michael or Sean to re-trigger the build.

@Qchristensen
Copy link
Member Author

Ping @jcsteh - there appears to be an issue with the new code which is preventing the build - are you able to have a look when you get a chance please?

@jcsteh
Copy link
Contributor

jcsteh commented Nov 29, 2023

Is this even after a re-trigger? In the first build I pushed, it seems to get stuck in a Chrome system test, but I don't know what because the console log is not particularly useful.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 29, 2023

If I had to guess, I'd say we're injecting a key, but that key never gets received by NVDA's keyboard hook for some reason. That would suggest it gets swallowed by something else or that our keyboard hook couldn't catch it for some reason. That's definitely one danger of this approach.

I guess I could add a small timeout when waiting for the injected key, but that feels pretty hacky.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 29, 2023

To make matters more fun, I think we might be hitting the AppVeyor job time limit here, so even if we uploaded an NVDA log from the test run, it wouldn't actually get uploaded because the job gets killed.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 29, 2023

Trying again.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 29, 2023

And trying a third time because I spotted some ways I could tighten things up and I'm a perfectionist.

@smbgsrini
Copy link
Contributor

Indeed I am very grateful to you all.
as you given link I have installd nvda_snapshot_try-injectEvt-30139,19bd9384.exe and checked it. NVDA announcing deleted character's by using backspace.
but, in kannada language there is character ೠ by pressing cap R and X characters ೠ appears. In keyboard setting of nvda, Handle keys from other applications is checked, by pressing caps R and X Kannada character ೠ unable to output.
if I un-checked, pressing caps R and X Kannada character ೠ appears.
this is also with NVDA functions. Because without using NVDA, pressing caps R and X Kannada character ೠ able to output. NVDA 2022.4 was much compatible with these issues.
kindly please add this compatibility feature in upcoming version.
With thanks,
Srinivasamurthy

@smbgsrini
Copy link
Contributor

after installing nvda_snapshot_try-injectEvt-30139,19bd9384.exe and
With NVDA's Keyboard setting "Handle keys from other applications" checked, Currently not recieving the following error:
"71 hotkeys have been received in the last 1812ms.
Do you want to continue?
yes no
(see #MaxHotkeysPerInterval in the help file)"
thanks for the effort.

@lukaszgo1
Copy link
Contributor

@smbgsrini Just to clarify: are there any differences in behavior with the nvda_snapshot_try-injectEvt-30139,19bd9384.exe as compared to NVDA 2022.4?

@smbgsrini
Copy link
Contributor

smbgsrini commented Dec 7, 2023 via email

@lukaszgo1
Copy link
Contributor

Hi @jcsteh Given your fix seems to solve this problem, are you planning to submit it as a PR?

@jcsteh
Copy link
Contributor

jcsteh commented Dec 21, 2023

Yeah, I'll submit a PR when I get a chance.

@smbgsrini
Copy link
Contributor

In nvda_2024.1beta1 has same problems which I mentioned through #Qchristensen

@nvaccessAuto nvaccessAuto added this to the 2024.2 milestone Dec 27, 2023
seanbudd pushed a commit that referenced this issue Dec 27, 2023
Fixes #15822.

Summary of the issue:
With "Handle keys from other applications" enabled, NVDA interferes with certain software which intercepts and re-transmits keyboard commands such as Nudi6.1. For example, this makes it impossible to use backspace while this software is running.

Description of user facing changes
Backspace now works correctly when using Nudi6.1 with NVDA's "Handle keys from other applications" setting enabled.

Description of development approach
Before #14708, we delayed slightly when sending keys, which would mean that any keys sent by an app which captured a key sent by NVDA would be ignored during that period. After #14708, we only ignore any keys received while NVDA is sending keys, but that doesn't include any keys captured and sent afterward by, for example, Nudi6.1. This could result in a loop where NVDA kept receiving the key it sent (re-transmitted by the other app) and sending it again.

To fix this, we now explicitly wait for the key sent by NVDA (e.g. backspace) to be received by the keyboard hook before we stop ignoring keys and thus return from KeyboardInputGesture.send(). This means that if another application intercepts this key and re-transmits it, we will wait for that re-transmission and ignore it. We use a kernel event so that the notification from the keyboard hook can be handled as quickly as possible without being dependent on the system timer resolution.

There is a chance that a key will be intercepted and never re-sent. To deal with this, we wait for a maximum timeout of 10 ms. This means that in the best case scenario, nothing intercepts a key sent by NVDA and we return almost immediately. In the worst case scenario, we wait between 10 and 30 ms (depending on the system timer resolution), which is no worse than the situation before #14708.
@smbgsrini
Copy link
Contributor

smbgsrini commented Dec 27, 2023 via email

Nael-Sayegh pushed a commit to Nael-Sayegh/nvda that referenced this issue Feb 15, 2024
)

Fixes nvaccess#15822.

Summary of the issue:
With "Handle keys from other applications" enabled, NVDA interferes with certain software which intercepts and re-transmits keyboard commands such as Nudi6.1. For example, this makes it impossible to use backspace while this software is running.

Description of user facing changes
Backspace now works correctly when using Nudi6.1 with NVDA's "Handle keys from other applications" setting enabled.

Description of development approach
Before nvaccess#14708, we delayed slightly when sending keys, which would mean that any keys sent by an app which captured a key sent by NVDA would be ignored during that period. After nvaccess#14708, we only ignore any keys received while NVDA is sending keys, but that doesn't include any keys captured and sent afterward by, for example, Nudi6.1. This could result in a loop where NVDA kept receiving the key it sent (re-transmitted by the other app) and sending it again.

To fix this, we now explicitly wait for the key sent by NVDA (e.g. backspace) to be received by the keyboard hook before we stop ignoring keys and thus return from KeyboardInputGesture.send(). This means that if another application intercepts this key and re-transmits it, we will wait for that re-transmission and ignore it. We use a kernel event so that the notification from the keyboard hook can be handled as quickly as possible without being dependent on the system timer resolution.

There is a chance that a key will be intercepted and never re-sent. To deal with this, we wait for a maximum timeout of 10 ms. This means that in the best case scenario, nothing intercepts a key sent by NVDA and we return almost immediately. In the worst case scenario, we wait between 10 and 30 ms (depending on the system timer resolution), which is no worse than the situation before nvaccess#14708.
SaschaCowley pushed a commit to SaschaCowley/nvda that referenced this issue Feb 27, 2024
)

Fixes nvaccess#15822.

Summary of the issue:
With "Handle keys from other applications" enabled, NVDA interferes with certain software which intercepts and re-transmits keyboard commands such as Nudi6.1. For example, this makes it impossible to use backspace while this software is running.

Description of user facing changes
Backspace now works correctly when using Nudi6.1 with NVDA's "Handle keys from other applications" setting enabled.

Description of development approach
Before nvaccess#14708, we delayed slightly when sending keys, which would mean that any keys sent by an app which captured a key sent by NVDA would be ignored during that period. After nvaccess#14708, we only ignore any keys received while NVDA is sending keys, but that doesn't include any keys captured and sent afterward by, for example, Nudi6.1. This could result in a loop where NVDA kept receiving the key it sent (re-transmitted by the other app) and sending it again.

To fix this, we now explicitly wait for the key sent by NVDA (e.g. backspace) to be received by the keyboard hook before we stop ignoring keys and thus return from KeyboardInputGesture.send(). This means that if another application intercepts this key and re-transmits it, we will wait for that re-transmission and ignore it. We use a kernel event so that the notification from the keyboard hook can be handled as quickly as possible without being dependent on the system timer resolution.

There is a chance that a key will be intercepted and never re-sent. To deal with this, we wait for a maximum timeout of 10 ms. This means that in the best case scenario, nothing intercepts a key sent by NVDA and we return almost immediately. In the worst case scenario, we wait between 10 and 30 ms (depending on the system timer resolution), which is no worse than the situation before nvaccess#14708.
Adriani90 pushed a commit to Adriani90/nvda that referenced this issue Mar 13, 2024
)

Fixes nvaccess#15822.

Summary of the issue:
With "Handle keys from other applications" enabled, NVDA interferes with certain software which intercepts and re-transmits keyboard commands such as Nudi6.1. For example, this makes it impossible to use backspace while this software is running.

Description of user facing changes
Backspace now works correctly when using Nudi6.1 with NVDA's "Handle keys from other applications" setting enabled.

Description of development approach
Before nvaccess#14708, we delayed slightly when sending keys, which would mean that any keys sent by an app which captured a key sent by NVDA would be ignored during that period. After nvaccess#14708, we only ignore any keys received while NVDA is sending keys, but that doesn't include any keys captured and sent afterward by, for example, Nudi6.1. This could result in a loop where NVDA kept receiving the key it sent (re-transmitted by the other app) and sending it again.

To fix this, we now explicitly wait for the key sent by NVDA (e.g. backspace) to be received by the keyboard hook before we stop ignoring keys and thus return from KeyboardInputGesture.send(). This means that if another application intercepts this key and re-transmits it, we will wait for that re-transmission and ignore it. We use a kernel event so that the notification from the keyboard hook can be handled as quickly as possible without being dependent on the system timer resolution.

There is a chance that a key will be intercepted and never re-sent. To deal with this, we wait for a maximum timeout of 10 ms. This means that in the best case scenario, nothing intercepts a key sent by NVDA and we return almost immediately. In the worst case scenario, we wait between 10 and 30 ms (depending on the system timer resolution), which is no worse than the situation before nvaccess#14708.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-specific p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants