Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Process injected mouse events #8459
Link to issue number:
Summary of the issue:
NVDA silently ignores mouse events that are injected by third party applications, particularly remote control software such as TeamViewer. When mouse tracking is enabled, NVDA does not announce what is under the mouse when a TeamViewer partner is controlling it.
Description of how this pull request fixes the issue:
Tested injected mouse events by having a colleague control my system remotely via TeamViewer. His mouse movement was announced by NVDA.
Known issues with pull request:
Mouse movement caused by SetCursorPos, which is strictly spoken only moving the mouse cursor, is still ignored by NVDA. We probably have to hook SetCursorPos if we want to support this, but I don't think that this is relevant. IN any case, it falls outside the scope of this pr.
Change log entry:
I'm a little worried about the robustness of this approach.
referenced this pull request
Jul 30, 2018
Hi, last time I checked, wx.Yield in wxPython 4 calls wx.AppConsole.Yield. I, @jcsteh, and wxPython developer had a discussion about this a while back. Thanks. From: Leonard de Ruijter <firstname.lastname@example.org> Sent: Monday, July 30, 2018 11:13 AM To: nvaccess/nvda <email@example.com> Cc: Joseph Lee <firstname.lastname@example.org>; Mention <email@example.com> Subject: Re: [nvaccess/nvda] Process injected mouse events (#8459) @josephsl <https://github.com/josephsl> : Could you elaborate on differences between WX Python 3 and 4 regarding wx.Yield? This code depends on wx.Yield, so it might make sense to change this as part of this pr at least in this area of the code. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#8459 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkPfL3Uzr_hIqBQiIsoyw5pfpjDDbks5uL0zJgaJpZM4U7XRW> .
KeyboardInputGesture.send requires a sleep and wx.yield because we want to guarantee that by the time that send returns, the keyboard input generated has been injected and NVDA has received and processed it. As we do not have scripts for mouse input currently, this is not relevant for the mouse.
From what I can read on msdn, low-level keyboard hooks will be run within the call to keybd_event, so to low-level mouse hooks will be run within mouse_event. Thus we can guarantee that the related ignore input variable we are setting with the context manager will be correct when the hooks run.
Perhaps we should look into replacing wx.yield in keyboardHandler, but I feel this is not something for this pr.
In short, once the other review actions in my review here are addressed, I am happy to approve this.