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
Keyboard hook swallows all keys if script without docstring blocks (e.g. gui.messageBox) #6797
Comments
Discussed/debugged this on IRC. Impact: If a script without a docstring blocks, NVDA traps all possible keys, making it impossible to even kill or restart NVDA from the keyboard. While this shouldn't occur in normal use, it's still pretty severe, particularly for developers. This occurs because in order to fix #2953, we queue all keys to be sent later by our main thread if a script without a docstring (an intercepted application command) is queued/running. This ensures that keys such as backspace (which NVDA intercepts) don't end up out of sequence with typed characters (keys we don't intercept) if NVDA's main thread takes a while to process something. The main thread isn't supposed to be blocked, but it's entirely possible to do this by mistake. We certainly shouldn't swallow keystrokes forever if this occurs. inputCore does check watchdog to see if the core is alive and it passes gestures straight through if not. This should mean we recover from this within 10 seconds, but it seems we don't. What I don't currently understand is why the watchdog isn't triggering in this case. P2 to at least investigate this. |
CC @michaelDCurran. |
…that it gets executed within NVDA's core pump, rather than executed directly. This will implicitly ensure that watchdog is alive during its execution. This is rather than waking watchdog specifically for this callable, which had the possibility of accidentally putting watchdog back to sleep during a core pump that caused wx to yield or start a modal loop. (#6797) # Please enter the commit message for your changes. Lines starting
…that it gets executed within NVDA's core pump, rather than executed directly. (#6892) This will implicitly ensure that watchdog is alive during its execution. This is rather than waking watchdog specifically for this callable, which had the possibility of accidentally putting watchdog back to sleep during a core pump that caused wx to yield or start a modal loop. (#6797)
STR:
Normally I would hear a beep, however I don't hear anything; NVDA disables my keyboard.
If it doesn't work, try a few more times; this doesn't trigger 100% of the time.
My media keys still work (previous, play/pause, next and volume). If I turn Handle keys from other applications on, they stop working like the rest of the keys.
The text was updated successfully, but these errors were encountered: